Skip to content

Commit

Permalink
清空影子目录前,需要判断目录是否存在
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Aug 2, 2024
1 parent e4bbb8a commit 835f859
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions Stardust/Deployment/ZipDeploy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Stardust/Stardust.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<PackageReference Include="NewLife.Remoting" Version="3.0.2024.801" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='net40'">
<PackageReference Include="NewLife.Core" Version="10.10.2024.0801" />
<PackageReference Include="NewLife.Core" Version="10.10.2024.0802-beta1036" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net40'">
<PackageReference Include="NewLife.Core" Version="10.10.2024.0801-net40" />
Expand Down

0 comments on commit 835f859

Please sign in to comment.