lib/fs: Handle deduplicated files on NTFS (fixes #1845)

These files always have the symlink bit set, because they are reparse
points. Nonetheless they are not symlinks, and Lstat reports a size for
them. We use this fact to disambiguate, and hope fervently that nothing
else matches this description so it comes back to bite us...

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4622
This commit is contained in:
Jakob Borg
2017-12-29 21:23:06 +00:00
committed by Audrius Butkevicius
parent 9988044bbe
commit a9f0659f2f
4 changed files with 41 additions and 7 deletions

View File

@@ -126,6 +126,8 @@ const ModePerm = FileMode(os.ModePerm)
const ModeSetgid = FileMode(os.ModeSetgid)
const ModeSetuid = FileMode(os.ModeSetuid)
const ModeSticky = FileMode(os.ModeSticky)
const ModeSymlink = FileMode(os.ModeSymlink)
const ModeType = FileMode(os.ModeType)
const PathSeparator = os.PathSeparator
const OptAppend = os.O_APPEND
const OptCreate = os.O_CREATE