-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Projects containing a Windows NTFS junction inside the source/data directory started failing from version 1.6.0 with the error:
read source\data\junction_link: Incorrect function.
The same setup works in 1.5.2.
What Was Tested
- Reproduced the problem on Windows using a minimal project with a junction (
mklink /J source\data\junction_link source\target_dir). - Ran the exact scenario on 1.5.2 (success) and 1.6.0 (failure).
- Forced sequential execution (removed goroutines) in 1.6.0: still fails, ruling out concurrency as the cause.
- Added diagnostic logging around the call to
copy.Copyin both versions: pre-copy state (mode, symlink detection) is identical. - Instrumented the third‑party
github.com/otiai10/copylibrary to log traversal: in failing versions the junction is classified as a regular file (isDir=false,isSymlink=false) and the library attempts a normal file copy, which triggers the Windows “Incorrect function” error. - Performed
git bisectbetween 1.5.2 (good) and 1.6.0 (bad): all intermediate commits in the range behaved as bad for this test, so the regression is cumulative rather than a single pinpoint change.
Observed Behavior
- 1.5.2: Junction copied without error (treated implicitly in a way that does not call the file-open path).
- 1.6.0+: Junction visited as if it were a regular file and copying fails immediately.
Probable Cause
Windows NTFS junctions (reparse points) are not recognized by the copy.Copy library as directories or symlinks in the updated code path introduced before 1.6.0. They fall through to the “regular file” branch, which tries to open the junction like a normal file and fails with “Incorrect function.” The change in the setup/copy flow between 1.5.2 and 1.6.0 exposed this latent limitation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels