We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce7a874 commit d66ea66Copy full SHA for d66ea66
drivers/local/driver.go
@@ -375,6 +375,13 @@ func (d *Local) Remove(ctx context.Context, obj model.Obj) error {
375
err = os.Remove(obj.GetPath())
376
}
377
} else {
378
+ if !utils.Exists(d.RecycleBinPath) {
379
+ err = os.MkdirAll(d.RecycleBinPath, 0755)
380
+ if err != nil {
381
+ return err
382
+ }
383
384
+
385
dstPath := filepath.Join(d.RecycleBinPath, obj.GetName())
386
if utils.Exists(dstPath) {
387
dstPath = filepath.Join(d.RecycleBinPath, obj.GetName()+"_"+time.Now().Format("20060102150405"))
0 commit comments