From 2add014d060ad75420ba4bcf1e2302724217bab6 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 6 Jun 2023 16:37:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=A4=87=E4=BB=BD=E6=96=87=E4=BB=B6=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E6=B3=95=E7=BB=A7=E7=BB=AD=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ContextMenuManager/Methods/BackupHelper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ContextMenuManager/Methods/BackupHelper.cs b/ContextMenuManager/Methods/BackupHelper.cs index c050ad4..03c9f20 100644 --- a/ContextMenuManager/Methods/BackupHelper.cs +++ b/ContextMenuManager/Methods/BackupHelper.cs @@ -189,7 +189,8 @@ private void CheckDeprecatedBackup() } // 如果设备目录为空且不为本机目录,则删除该设备目录 - if ((Directory.GetFiles(deviceDir).Length == 0) && (deviceDir != AppConfig.ComputerHostName)) + string device = Path.GetFileName(deviceDir); + if ((Directory.GetFiles(deviceDir).Length == 0) && (device != AppConfig.ComputerHostName)) { Directory.Delete(deviceDir); }