Sfoglia il codice sorgente

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

mengxiangge 5 anni fa
parent
commit
36dee6f04f
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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);