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

Copy all files from dir into subdir inside that dir #113

Open
falconmick opened this issue Nov 15, 2016 · 1 comment
Open

Copy all files from dir into subdir inside that dir #113

falconmick opened this issue Nov 15, 2016 · 1 comment

Comments

@falconmick
Copy link

I don't know if this is a bug or just an example of misuse that you don't really care if it exists.

Today I decided to copy all files inside of docs/ into docs/scratch-list so that I could test my app inside of my local instance before I deploy to https://falconmick.github.io/scratch-list/

about 10 seconds later I realised that somthing bad was probably happening and stopped the process. By this time it had created a directory 23108 characters long comprimised of 1775 sub directories of scratch-list.

At this point windows decided to be as awesome as possible and tell me that the files located inside of it had too long a name to delete, so I had to use robocopy to copy the files into oblivion (stupid I know).

For now my solution is going to be copy to a tmp dir then back into the docs/ folder after the prior one completes, but should this even be a thing? My thoughts would be it would copy the current files in that directory at time of start, not continuously look for new files.

Cheers,
Michael.

@ribizli
Copy link

ribizli commented Nov 20, 2017

I've got into this problem with fs-extra's copy.
copy('folder', 'folder/folder')
Actually I think it is a forbidden file operation on OS level:

> cp -r test/ test/
cp: recursion detected, omitting directory 'test/test'

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

No branches or pull requests

2 participants