mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Support creating directories on erasure coded backend (#5443)
This PR continues from #5049 where we started supporting directories for erasure coded backend
This commit is contained in:
committed by
Nitish Tiwari
parent
45c35b3544
commit
3ea28e9771
@@ -17,6 +17,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"path"
|
||||
"sync"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
@@ -221,6 +222,11 @@ func cleanupDir(storage StorageAPI, volume, dirPath string) error {
|
||||
return errors.Trace(err)
|
||||
} // else on success..
|
||||
|
||||
// Entry path is empty, just delete it.
|
||||
if len(entries) == 0 {
|
||||
return errors.Trace(storage.DeleteFile(volume, path.Clean(entryPath)))
|
||||
}
|
||||
|
||||
// Recurse and delete all other entries.
|
||||
for _, entry := range entries {
|
||||
if err = delFunc(pathJoin(entryPath, entry)); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user