diff --git a/Stardust/Deployment/ZipDeploy.cs b/Stardust/Deployment/ZipDeploy.cs index d3755a2e..5c3bec6c 100644 --- a/Stardust/Deployment/ZipDeploy.cs +++ b/Stardust/Deployment/ZipDeploy.cs @@ -411,15 +411,18 @@ public virtual void Extract(String shadow, CopyModes exefile, CopyModes configfi break; case DeployModes.Standard: WriteLog("清空影子目录中的可执行文件"); - foreach (var item in sdi.GetFiles()) + if (sdi.Exists) { - if (IsExe(item.Extension)) - item.Delete(); + foreach (var item in sdi.GetFiles()) + { + if (IsExe(item.Extension)) + item.Delete(); + } } break; case DeployModes.Full: WriteLog("清空影子目录中的所有文件"); - sdi.Delete(true); + if (sdi.Exists) sdi.Delete(true); shadow.EnsureDirectory(false); break; default: diff --git a/Stardust/Stardust.csproj b/Stardust/Stardust.csproj index 254aa518..b9d86ad7 100644 --- a/Stardust/Stardust.csproj +++ b/Stardust/Stardust.csproj @@ -115,7 +115,7 @@ - +