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 433dcd1 commit 1fe26bfCopy full SHA for 1fe26bf
drivers/local/driver.go
@@ -374,6 +374,13 @@ func (d *Local) Remove(ctx context.Context, obj model.Obj) error {
374
err = os.Remove(obj.GetPath())
375
}
376
} else {
377
+ if !utils.Exists(d.RecycleBinPath) {
378
+ err = os.MkdirAll(d.RecycleBinPath, 0755)
379
+ if err != nil {
380
+ return err
381
+ }
382
383
+
384
dstPath := filepath.Join(d.RecycleBinPath, obj.GetName())
385
if utils.Exists(dstPath) {
386
dstPath = filepath.Join(d.RecycleBinPath, obj.GetName()+"_"+time.Now().Format("20060102150405"))
0 commit comments