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

Unable to copy folder content from network folder #1085

Open
Zezeq opened this issue Mar 8, 2022 · 1 comment
Open

Unable to copy folder content from network folder #1085

Zezeq opened this issue Mar 8, 2022 · 1 comment

Comments

@Zezeq
Copy link

Zezeq commented Mar 8, 2022

Node version (or tell us if you're using electron or some other framework):

Node 10.21.0

ShellJS version (the most recent version/Github branch you see the bug on):

0.8.5

Operating system:

Windows 10

Description of the bug:

When I try to copy all content (*) from a network folder I get an error saying "No such file or directory". Copying the folder itself works fine.
If I try to copy all content (*) from a folder on a local drive to another local folder it works as expected.

Example ShellJS command to reproduce the error:

var shell = require("shelljs");
shell.cp('-rf', '//SERVER/Products/MyProduct/*', 'C:\\Temp');   //Fails
shell.cp('-rf', 'C:\\Products\\MyProduct\\*', 'C:\\Temp');         //Works
shell.cp('-rf', '//SERVER/Products/MyProduct', 'C:\\Temp');     // Works
@nfischer
Copy link
Member

nfischer commented Mar 9, 2022

Sounds like the glob expansion is failing for the network drive. This is probably an issue specific to how Windows works, since it sounds like it's not returning the directory listing.

Can you test what https://github.com/isaacs/node-glob does for the same path?

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

No branches or pull requests

2 participants