Skip to content

Conversation

@sabiwara
Copy link
Contributor

Tentative fix for #14924

I don't like it too much, because we could still have a race condition and the src file could have been removed in between the two calls - but the current code works with two successive calls anyway so it's probably acceptable.

The core issue is that :file.copy, called in do_cp_file, would return {:error, :enoent} in both those cases without allowing us to distinguish:

  • :file.copy(non_existing_file, existing_dir)
  • :file.copy(existing_file, non_existing_dir)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants