Pārlūkot izejas kodu

mxg:文件夹不存在时,先创建文件夹

mengxiangge 5 gadi atpakaļ
vecāks
revīzija
36dee6f04f
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      PackageUpdater/WPFTestUpdate/MainWindow.xaml.cs

+ 2 - 0
PackageUpdater/WPFTestUpdate/MainWindow.xaml.cs

@@ -154,6 +154,8 @@ namespace PackageUploader
                         string compressName = Untility.GetFileVersion(exePath).ToString().ToCompressKey();
                         RefrushState("正在进行压缩");
                         string compressPath = @"C:\VersionsTest";
+                        if (!Directory.Exists(compressPath))
+                            Directory.CreateDirectory(compressPath);
                         string compressFullPath = Path.Combine(compressPath, compressName);
 
                         Untility.CompressDir(compressFullPath, dirList.ToArray(), RefrushState);