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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Can't create top level directories with a uuid UNC path #3864

Open
iseahound opened this issue Jan 9, 2020 · 10 comments
Open

Windows: Can't create top level directories with a uuid UNC path #3864

iseahound opened this issue Jan 9, 2020 · 10 comments

Comments

@iseahound
Copy link

iseahound commented Jan 9, 2020

Hey Nick,
Windows has a lot of specific quirks, and this is another one of them 馃檨.
This one is really minor (and only affects top level directories).

Using a uuid instead of a drive letter introduces an error only when creating top level directories.

2020/01/09 02:20:41 ERROR : string.txt: Failed to copy: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
2020/01/09 02:20:41 ERROR : Local file system at //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder: not deleting files as there were IO errors
2020/01/09 02:20:41 ERROR : Local file system at //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder: not deleting directories as there were IO errors
2020/01/09 02:20:41 ERROR : Attempt 1/3 failed with 1 errors and: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
2020/01/09 02:20:41 ERROR : string.txt: Failed to copy: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
2020/01/09 02:20:41 ERROR : Local file system at //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder: not deleting files as there were IO errors
2020/01/09 02:20:41 ERROR : Local file system at //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder: not deleting directories as there were IO errors
2020/01/09 02:20:41 ERROR : Attempt 2/3 failed with 1 errors and: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
2020/01/09 02:20:41 ERROR : string.txt: Failed to copy: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
2020/01/09 02:20:41 ERROR : Local file system at //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder: not deleting files as there were IO errors
2020/01/09 02:20:41 ERROR : Local file system at //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder: not deleting directories as there were IO errors
2020/01/09 02:20:41 ERROR : Attempt 3/3 failed with 1 errors and: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
2020/01/09 02:20:41 Failed to sync: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.

Here's a short script demonstrating the bug:

mkdir folder
echo A large fawn jumped quickly over white zinc boxes. > folder\string.txt
call rclone sync folder "\\?\Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}\folder"
pause

To get the uuid value for the volume run mountvol and copy and paste your unique value into the script.

Note that using a regular UNC path like \\?\C:\ works fine.

@ncw ncw added the bug label Jan 9, 2020
@ncw ncw added this to the Known Problem milestone Jan 9, 2020
@ncw
Copy link
Member

ncw commented Jan 9, 2020

What do you think rclone should be doing differently here? I'm not an expert on Windows file systems so I'm not sure what the best fix is? Or is it just document the quirk and move on?

@iseahound
Copy link
Author

Document and move on. Probably something to do with curly braces in a UNC path.

@ncw
Copy link
Member

ncw commented Jan 9, 2020

It is strange it only doesn't work at the root.

This is almost certainly a go runtime bug - I looked at the go issues and there are lots about mkdir not working properly on Windows at the root, however they were all closed so this is probably a new issue.

I'll leave this issue open for someone else to find if they are affected by it.

@Animosity022
Copy link
Collaborator

@iseahound - did you want to try on the later version and beta and see if it still exists? If it was a go issue, it might have been solved.

@iseahound
Copy link
Author

Still failing on v1.51.0-353-g5f71d186-beta.

@ncw
Copy link
Member

ncw commented May 23, 2020

I think what we need to do is write a small go program to demonstrate the problem and post it as an issue on the go bug tracker.

I don't have a Windows machine to hand right now - @iseahound is that something you could help with?

@ivandeex
Copy link
Member

Let's reproduce and document it as Windows Caveat.

@ivandeex
Copy link
Member

@albertony
Could you add a note about //?/Volume{a224c74f-da87-c295-3b90-cde0f64a29cc}/folder uuid paths in your windows docs?
Thank you
cc @ncw

@ncw
Copy link
Member

ncw commented Feb 11, 2021

I made an upstream bug about this on Go: golang/go#39785

@ivandeex
Copy link
Member

This was documented recently

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

4 participants