From de09015154f8d6114978dc1c92a66eeba719c00a Mon Sep 17 00:00:00 2001 From: weisd Date: Thu, 15 Aug 2024 17:37:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=8A=E4=BC=A0=E5=90=8C=E5=90=8D?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=97=B6=E5=88=A0=E9=99=A4=E6=97=A7=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecstore/src/disk/local.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ecstore/src/disk/local.rs b/ecstore/src/disk/local.rs index 22651538..7617e728 100644 --- a/ecstore/src/disk/local.rs +++ b/ecstore/src/disk/local.rs @@ -159,6 +159,7 @@ impl LocalDisk { debug!("delete_file ranme to trash {:?} to {:?}", &delete_path, &trash_path); + // TODO: 清空回收站 if let Err(err) = fs::rename(&delete_path, &trash_path).await { match err.kind() { ErrorKind::NotFound => (), @@ -169,6 +170,9 @@ impl LocalDisk { } } + // FIXME: 先清空回收站吧,有时间再添加判断逻辑 + let _ = fs::remove_dir_all(&trash_path).await; + // TODO: immediate } else { if delete_path.is_dir() {