Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Fix one multi-delete test failure in Windows CI (minio#9602)
There is a disparency of behavior under Linux & Windows about the returned error when trying to rename a non existant path. err := os.Rename("/path/does/not/exist", "/tmp/copy") Linux: isSysErrNotDir(err) = false os.IsNotExist(err) = true Windows: isSysErrNotDir(err) = true os.IsNotExist(err) = true ENOTDIR in Linux is returned when the destination path of the rename call contains a file in one of the middle segments of the path (e.g. /tmp/file/dst, where /tmp/file is an actual file not a directory) However, as shown above, Windows has more scenarios when it returns ENOTDIR. For example, when the source path contains an inexistant directory in its path. In that case, we want errFileNotFound returned and not errFileAccessDenied, so this commit will add a further check to close the disparency between Windows & Linux.
- Loading branch information