-
Notifications
You must be signed in to change notification settings - Fork 775
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
copySync Cannot Copy Documents Folder on Windows #726
Comments
That does seem weird. First off, you command is incorrect, if you're copying Documents to temp, you probably want it copied to |
Same Problem with |
Those are not actual folders but Windows "Libraries". They are gruesome to deal with in many situations and as such should be avoided IMO. Some reading material: https://docs.microsoft.com/en-us/windows/client-management/windows-libraries @danielehrhardt While i haven't tested this I guess that your command tries to copy the symlink (if it even is one) to In the event that you do want to copy/create symlinks you'll need the SECreateSymbolicLinkPrivilege privilege. (The Administrators AD group has that by default already.) |
I think it should be possible to create junction symlinks on Windows without administrators priv, see discussion in #626 /cc @oliversalzburg |
@brodybits I don’t know about junctions but you do need said privilege for regular directory symlinks. Edit: Also note that the privilege is not exlusive to administrators but can be assigned to any SID. |
Is also not working |
You're best off using Windows native utilities for copying these core directories. |
This is how you fix Problems? |
Node.js itself has very poor support for the various kinds of symlinks on Windows. If you want to dig in, find the problem, and submit a PR, you're welcome to. I cannot dedicate time to this. |
Just FYI, NodeJS is not able to distinguish a junction from other types of links on Windows. I implemented https://github.com/oliversalzburg/is-junction to work around this issue and solve it in our world. My attempts to have this integrated into NodeJS was just met by grumpy developers/maintainers who did not see the point apparently. |
Windows 10 Pro 64 bit
v10.16.0
fs-extra
version:v8.1.0
If i use copy or copySync to copy the Documents Folder on Windows i get the following Error:
My User is a AD User.
My Command:
copySync('C:\\Users\\daniel.ehrhardt\\Documents', 'C:\\temp');
I do not Understand why, the folder Pictures is not in the Documents Folder.
The text was updated successfully, but these errors were encountered: