diff --git a/backend/handlers/files.go b/backend/handlers/files.go index ab37eac..fcee3a3 100644 --- a/backend/handlers/files.go +++ b/backend/handlers/files.go @@ -457,7 +457,7 @@ func (h *FSHandler) Move(c *fiber.Ctx) error { dstFull = filepath.Join(parentDir, uniqueName) body.DestPath = filepath.Join(filepath.Dir(body.DestPath), uniqueName) } else { - os.RemoveAll(dstFull) + safeRemovePath(h.Config.StorageDir, dstFull) } } @@ -515,7 +515,7 @@ func (h *FSHandler) Copy(c *fiber.Ctx) error { uniqueName := GetUniquePath(parentDir, filepath.Base(dstFull)) finalDst = filepath.Join(parentDir, uniqueName) } else { - os.RemoveAll(dstFull) + safeRemovePath(h.Config.StorageDir, dstFull) } }