lib/fs: Treat Windows junctions as normal directories (#6606)

Fixes #1830, presumably.
This commit is contained in:
xarx00
2020-05-13 21:46:24 +02:00
committed by GitHub
parent 3ad049184e
commit ee445e35a0
8 changed files with 242 additions and 8 deletions
+10 -1
View File
@@ -8,7 +8,10 @@
package fs
import "syscall"
import (
"os"
"syscall"
)
func (e basicFileInfo) Mode() FileMode {
return FileMode(e.FileInfo.Mode())
@@ -27,3 +30,9 @@ func (e basicFileInfo) Group() int {
}
return -1
}
// fileStat converts e to os.FileInfo that is suitable
// to be passed to os.SameFile. Non-trivial on Windows.
func (e *basicFileInfo) osFileInfo() os.FileInfo {
return e.FileInfo
}