{{ message }}
local: clarify Windows long path errors#9532
Open
nightt5879 wants to merge 2 commits into
Open
Conversation
Member
573699f to
a79383b
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #5612.
Summary
--local-nouncis enabled and the affected path is longReproduction notes
On my Windows test machine,
LongPathsEnabled=1, and a non-UNC path of 292 UTF-16 code units succeeds foros.MkdirAll, rclonefile.OpenFile,os.Stat,os.Chtimes,os.Remove, andos.Rename. So the patch no longer enforcesMAX_PATHbefore calling the OS.For path-related Windows failures I could reproduce:
file.OpenFilebelow an overlong component returnsERROR_PATH_NOT_FOUND(3), shown asThe system cannot find the path specified.file.OpenFilewith an overlong final component returnsERROR_INVALID_NAME(123)os.MkdirAllwith an overlong component returnsERROR_INVALID_NAME(123)The original issue/forum report mentions the localized equivalent of
The system cannot find the path specified, so this wrapsERROR_PATH_NOT_FOUNDand the related path-length/name errors only when--local-nouncis set and the path is long.Tests
go test ./backend/local -run 'Test(WrapWindowsLongPathError|RmdirWindows|CleanWindows|IsDiskFullError|UpdateFatalIfNoSpace)' -count=1GOOS=linux GOARCH=amd64 go test -c ./backend/local -o NULI also ran
go test ./backend/local -count=1on Windows. It currently fails in existing symlink tests because this account does not have the Windows privilege to create symlinks (A required privilege is not held by the client).