To recap, this issue occurs when the full path of a symlink path exceeds the Windows limit (about 260 characters). The reason why it happened only with the -vss option in this case is because with the shadow copy the symlink is accessed via an alternative path which can be much longer.
Also it can happen to any symlinks, even on a Windows volume without data deduplication. When the Windows data deduplication feature is enabled, however, this is more likely to happen because every deduplicated file becomes a symlink.
The fix is to use the UNC path when reading a symlink:
However, it appears to me that this fix is not necessary if you have the latest version of go, because now filepath.Join
already produces UNC paths.
I’ll make a new release containing this fix by the end of this week.