xl: Remove non needed check for empty dir (#11835)

RenameData renames xl.meta and data dir and removes the parent directory
if empty, however, there is a duplicate check for empty dir, since the
parent dir of xl.meta is always the same as the data-dir.
This commit is contained in:
Anis Elleuch 2021-03-19 20:26:53 +01:00 committed by GitHub
parent 27eb4ae3bc
commit 4d86384dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1977,12 +1977,6 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath, dataDir,
s.deleteFile(srcVolumeDir, parentDir, false)
}
if srcDataPath != "" {
if parentDir := pathutil.Dir(srcDataPath); isDirEmpty(parentDir) {
s.deleteFile(srcVolumeDir, parentDir, false)
}
}
return nil
}