Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

mv moves globs to the wrong location when a directory already exists #232

Open
daveFNbuck opened this issue Oct 16, 2017 · 0 comments
Open

Comments

@daveFNbuck
Copy link
Contributor

Script to trigger this:

snakebite rm -R '/tmp/test*'
snakebite mkdir /tmp/test
snakebite mkdir /tmp/test/a
snakebite mkdir /tmp/test_trash
snakebite mkdir /tmp/test_trash/a
snakebite mkdir /tmp/test_trash/a/b
snakebite mv /tmp/test_trash/* /tmp/test
snakebite ls /tmp/test
snakebite ls /tmp/test/a

This fails to move /tmp/test_trash/a to /tmp/test because /tmp/test/aalready exists. Weirdly, it then goes on to successfully move/tmp/test_trash/a/b to /tmp/test/b. If we don't make the /tmp/test/a directory, this works as expected, creating /tmp/test/a/b.

daveFNbuck added a commit to daveFNbuck/snakebite that referenced this issue Oct 16, 2017
As in spotify#232, continuing mv after an error can have unexpected bad results
daveFNbuck added a commit to daveFNbuck/snakebite that referenced this issue Oct 16, 2017
As in spotify#232, continuing mv after an error can have unexpected bad
results. By stopping the mv, we leave it up to the user how to resolve
the situation.
daveFNbuck added a commit to daveFNbuck/snakebite that referenced this issue Oct 16, 2017
As in spotify#232, continuing mv after an error can have unexpected bad
results. By stopping the mv, we leave it up to the user how to resolve
the situation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant