From 925b055318f465a5f4604c43f0ebeca5a5a8d9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Tue, 21 Mar 2023 12:52:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(fs):=E4=BF=AE=E5=A4=8D=E5=A4=B1=E8=AF=AF?= =?UTF-8?q?=E5=88=97=E4=B8=BE=E6=96=87=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/commands/files.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/commands/files.rs b/src-tauri/src/commands/files.rs index 77a9937..7f65f12 100644 --- a/src-tauri/src/commands/files.rs +++ b/src-tauri/src/commands/files.rs @@ -146,7 +146,7 @@ pub async fn scan_for_child_dirs( for entry in std::fs::read_dir(target).map_err(|e| format!("无法读取指定文件夹,{}", e))? { let entry = entry.map_err(|e| format!("无法获取指定文件夹信息,{}", e))?; - if is_hidden(&entry) || is_root(&entry) { + if is_hidden(&entry) || is_root(&entry) || entry.path().is_file() { continue; } let dir_hash_id = entry