From f05ccd775abf1a51a39b0363d72fe7942815e01b Mon Sep 17 00:00:00 2001 From: xarx00 Date: Thu, 14 May 2020 08:09:58 +0200 Subject: [PATCH] lib/fs: Set execute bits on junctions converted to dirs (ref #6606) (#6645) --- lib/fs/lstat_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fs/lstat_windows.go b/lib/fs/lstat_windows.go index e05be7b9e..14730894b 100644 --- a/lib/fs/lstat_windows.go +++ b/lib/fs/lstat_windows.go @@ -57,7 +57,9 @@ type dirJunctFileInfo struct { } func (fi *dirJunctFileInfo) Mode() os.FileMode { - return fi.FileInfo.Mode() ^ os.ModeSymlink | os.ModeDir + // Simulate a directory and not a symlink; also set the execute + // bits so the directory can be traversed Unix-side. + return fi.FileInfo.Mode() ^ os.ModeSymlink | os.ModeDir | 0111 } func (fi *dirJunctFileInfo) IsDir() bool {