mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 13:10:22 +03:00
Unit tests for PUT object when object already exists (#1904)
* fs/xl tests for multiple put object requests * xl fix for put object on directory * Unit tests fix windows test issue.
This commit is contained in:
committed by
Harshavardhana
parent
80d83220ad
commit
4ee2136b28
@@ -23,6 +23,7 @@ import (
|
||||
"os"
|
||||
slashpath "path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
@@ -691,6 +692,11 @@ func (s posix) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) (err er
|
||||
// File path cannot be verified since one of the parents is a file.
|
||||
if strings.Contains(err.Error(), "not a directory") {
|
||||
return errFileAccessDenied
|
||||
} else if strings.Contains(err.Error(), "The system cannot find the path specified.") && runtime.GOOS == "windows" {
|
||||
// This is a special case should be handled only for
|
||||
// windows, because windows API does not return "not a
|
||||
// directory" error message. Handle this specifically here.
|
||||
return errFileAccessDenied
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user