mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -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:
@@ -442,11 +442,11 @@ func TestFSRemoveMeta(t *testing.T) {
|
||||
t.Fatalf("Unable to remove file, %s", err)
|
||||
}
|
||||
|
||||
if _, err := os.Stat(filePath); !os.IsNotExist(err) {
|
||||
if _, err := osStat(preparePath(filePath)); !os.IsNotExist(err) {
|
||||
t.Fatalf("`%s` file found though it should have been deleted.", filePath)
|
||||
}
|
||||
|
||||
if _, err := os.Stat(path.Dir(filePath)); !os.IsNotExist(err) {
|
||||
if _, err := osStat(preparePath(path.Dir(filePath))); !os.IsNotExist(err) {
|
||||
t.Fatalf("`%s` parent directory found though it should have been deleted.", filePath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user