mirror of
https://github.com/minio/minio.git
synced 2025-11-22 18:47:43 -05:00
Ignore prefix renames when dest directory is not empty (#5798)
Also make sure to not modify the underlying errors from layers, we should return the error as is and one object layer should translate the errors. Fixes #5797
This commit is contained in:
@@ -994,6 +994,7 @@ func (s *posix) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) (err e
|
||||
// we still need to allow overwriting an empty directory since it represents
|
||||
// an object empty directory.
|
||||
_, err = os.Stat(dstFilePath)
|
||||
|
||||
if err == nil && !isDirEmpty(dstFilePath) {
|
||||
return errFileAccessDenied
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user