Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Do not allow moving a folder into itself #1173
Description of the Change
Do not allow any recursive copying, such as when attempting to copy
As a side effect of this change, Tree View no longer allows copying a directory directly inside itself, such as from
Carefully copy the folder structure once instead of recursively. This is much harder to implement and is also not what major OSes do.
This fixes a usability issue where you would be unintentionally left with a massive folder structure (unable to be deleted on Windows through conventional means) that freezes Atom.
The only negative impact I can think of is pasting folders directly inside themselves no longer works.
Tested it on mac without symlinks and things look good.
With symlink does you get a weird behavior where it attempts to do it but fails after the first folder. none of the contents in that folder are copied either.
you get the following:
@jasonrudolph Sorry for the delay! Here's the test plan I came up with.
Now, create a symlink
To the best of my recollection, that's how I tested this PR when I first created it. If you'd like to see some other tests, please let me know.
Do those tests seem reasonable? If so, I recommend the following next steps:
Went through the verification process on macOS 10.12.6 and Ubuntu 16.04 - only 1 of the tests didn't have the expected result:
On both macOS and Ubuntu, the operation completes without an error notification or anything in devtools console, but
GIF-age on macOS (behavior is the same on Ubuntu):
All the other tests had the expected results but let me know if I misunderstood anything with this last test @50Wliu.