-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Symlinks to a directory are not detected in Windows #1078
Copy link
Copy link
Closed
Description
Output of restic version
restic 0.7.0
compiled with go1.8.3 on windows/amd64
How did you start restic exactly? (Include the complete command line)
restic backup --repo R:\test_backup R:\test
What backend/server/service did you use?
Local.
Expected behavior
The symlink to a directory should be detected just like symlinks to files are.
Actual behavior
warning for test\symlinkdir: invalid node type ""
Steps to reproduce the behavior
restic init --repo R:\test_backup
restic backup --repo R:\test_backup R:\test
R:\test contains a directory called realdir and a symlink to it called symlinkdir created with mklink /D symlinkdir realdir (you'll need an elevated prompt in order to do that). A junction to the directory (mklink /J) behaves the same way (what's the difference? see end of page 431).
Do you have any idea what may have caused this?
Somehow nodeTypeFromFileInfo() is returning "" for a symlink to a directory. It might be a bug in the os package and this is more like an upstream thing?
Reactions are currently unavailable