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

Copying and pasting directories inside themselves has undesirable results #656

Closed
Mr-Wallet opened this issue Nov 19, 2015 · 7 comments
Closed

Comments

@Mr-Wallet
Copy link

Version 1.2.2, Windows 8.

  • Select a folder A with file x.
  • Perform a copy, then perform 3 pastes.
  • The following structure results:
A
| A
| | x
|
| A0
| | A
| | | x
| | x
|
| A1
| | A
| | | x
| |
| | A0
| | | A
| | | | x
| | | x
| | x
| x

The paste operation is looking at the source path at the moment of pasting, which is unintuitive. I would expect it to store a list of all file paths at the moment of copying.

I'm not familiar with the exact effects of #631 but in 1.2.2, the effects of selecting the pasted item can be disastrous:

  • Select a folder A with file x.
  • Perform a copy, then perform a paste.
  • Select the folder A/A.
  • Perform a paste.
  • The following structure results:
A
| A
| | A
| | | A
| | | | A
| | | | | A
| | | | | | A
...
| | x
| x

Atom locks up and continues making empty A directories until the application is forcibly closed.
When reproducing this issue, it's very easy to end up with file paths so long that Windows is unable to delete them. I found rimraf very helpful in cleaning up afterward.

@glangford
Copy link
Contributor

Under #631 - this sequence causes an ENAMETOOLONG to be thrown (rather than in addition to generating tons of directories):

  • Select a folder A with file x.
  • Perform a copy, then perform a paste. [paste triggers reselection]
  • Perform a paste.

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Jun 9, 2016

Duplicate #509?

@Mr-Wallet
Copy link
Author

The 2nd half looks like a duplicate, but the first half is not attested in 509, even though I believe they probably have a common cause.

@openks
Copy link

openks commented Jun 20, 2016

yes,I got the same result,it take me for half an hour to remove the useless folders, before i remove all the folders when i open the atom it continues make new folders... it's not easy to remove these folders beacse its too long for windows file system. something must be wrong with it,

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Dec 23, 2016

@ungb can you reproduce this and check #509 also?

@ungb
Copy link
Contributor

ungb commented Feb 2, 2017

I can repro this.

We should do what the OS does and not allow this behavior. Neither mac or windows File Explorer allows this.

image

image

@50Wliu
Copy link
Contributor

50Wliu commented Jul 12, 2018

I just tried reproducing this with #1173 merged and was unable to, so I am assuming that this has been fixed.

@50Wliu 50Wliu closed this as completed Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants