Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exeption not thrown when from-path does not exist in fileset #325

Closed
martinklepsch opened this issue Oct 28, 2015 · 1 comment · Fixed by #327
Closed

Exeption not thrown when from-path does not exist in fileset #325

martinklepsch opened this issue Oct 28, 2015 · 1 comment · Fixed by #327
Assignees
Labels

Comments

@martinklepsch
Copy link
Member

if-let below will always be true.

  (mv [this from-path to-path]
    (if (= from-path to-path)
      this
      (if-let [f (assoc (get-in this [:tree from-path]) :path to-path)]
        (update-in this [:tree] #(-> % (assoc to-path f) (dissoc from-path)))
        (throw (Exception. (format "not in fileset (%s)" from-path))))))
@micha
Copy link
Contributor

micha commented Oct 28, 2015

@martinklepsch good catch! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants