mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
windows: Support all REPARSE_POINT attrib files properly. (#4203)
This change adopts the upstream fix in this regard at https://go-review.googlesource.com/#/c/41834/ for Minio's purposes. Go's current os.Stat() lacks support for lot of strange windows files such as - share symlinks on SMB2 - symlinks on docker nanoserver - de-duplicated files on NTFS de-duplicated volume. This PR attempts to incorporate the change mentioned here https://blogs.msdn.microsoft.com/oldnewthing/20100212-00/?p=14963/ The article suggests to use Windows I/O manager to dereference the symbolic link. Fixes #4122
This commit is contained in:
@@ -59,7 +59,7 @@ func TestGetCurrentReleaseTime(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fi, err = os.Stat(goBinAbsPath)
|
||||
fi, err = osStat(goBinAbsPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -87,7 +87,7 @@ func TestGetCurrentReleaseTime(t *testing.T) {
|
||||
}
|
||||
errorMessage4 := "Unable to get ModTime of /tmp/non-existent-file. stat /tmp/non-existent-file: no such file or directory"
|
||||
if runtime.GOOS == "windows" {
|
||||
errorMessage4 = "Unable to get ModTime of C:\\tmp\\non-existent-file. GetFileAttributesEx C:\\tmp\\non-existent-file: The system cannot find the path specified."
|
||||
errorMessage4 = "Unable to get ModTime of C:\\tmp\\non-existent-file. CreateFile C:\\tmp\\non-existent-file: The system cannot find the path specified."
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
Reference in New Issue
Block a user