diff --git a/cmd/os-reliable.go b/cmd/os-reliable.go index 26c7df7b1..c76709d2e 100644 --- a/cmd/os-reliable.go +++ b/cmd/os-reliable.go @@ -131,7 +131,11 @@ func renameAll(srcFilePath, dstFilePath string) (err error) { if err = reliableRename(srcFilePath, dstFilePath); err != nil { switch { - case isSysErrNotDir(err): + case isSysErrNotDir(err) && !os.IsNotExist(err): + // Windows can have both isSysErrNotDir(err) and os.IsNotExist(err) returning + // true if the source file path contains an inexistant directory. In that case, + // we want to return errFileNotFound instead, which will honored in subsequent + // switch cases return errFileAccessDenied case isSysErrPathNotFound(err): // This is a special case should be handled only for diff --git a/cmd/server_test.go b/cmd/server_test.go index aa2074fd9..fd2523b38 100644 --- a/cmd/server_test.go +++ b/cmd/server_test.go @@ -28,7 +28,6 @@ import ( "net/http" "net/url" "reflect" - "runtime" "strings" "sync" "testing" @@ -121,9 +120,6 @@ func runAllTests(suite *TestSuiteCommon, c *check) { } func TestServerSuite(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("cannot set up server reliably on Windows") - } testCases := []*TestSuiteCommon{ // Init and run test on FS backend with signature v4. {serverType: "FS", signer: signerV4},