From 1d5e384497c7059e09760628dab3e83eb88f97ae Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 04 十二月 2020 17:48:34 +0800 Subject: [PATCH] 2020-12-04-4 --- HDL_ON/DAL/FileUtils.cs | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HDL_ON/DAL/FileUtils.cs b/HDL_ON/DAL/FileUtils.cs index a4ad571..6330ee5 100644 --- a/HDL_ON/DAL/FileUtils.cs +++ b/HDL_ON/DAL/FileUtils.cs @@ -79,11 +79,11 @@ foreach (FileInfo NextFile in thFolders) { index++; - if (NextFile.Name == "headImage.png") + if (NextFile.Name.Contains(ImageUtlis.HEADIMAGE)) { continue; } - if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB") + if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB" || NextFile.Name == OnAppConfig.ConfigFile) { continue; } @@ -194,7 +194,7 @@ /// <param name="fileName">File name.</param> public static void DeleteFile(string fileName) { - if (fileName == null || fileName == "Language.ini" || fileName == "AccountListDB") + if (fileName == null || fileName == "Language.ini" || fileName == "AccountListDB" || fileName == OnAppConfig.ConfigFile) { return; } @@ -211,7 +211,7 @@ for (int j = 0; j < filesList.Count; j++) { var f = filesList[j]; - if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File") + if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File" || f == OnAppConfig.ConfigFile) continue; DeleteFile(f); } @@ -416,8 +416,8 @@ System.IO.FileInfo fileInfo = new System.IO.FileInfo(oldPath); if (fileInfo.Exists) { - fileInfo.CopyTo(Application.RootPath + fileName, true); - //Shared.Utlis.WriteLine("Restroe : " + NextFile.Name); + fileInfo.CopyTo(Path.Combine(RootPath, fileName), true); + //Utlis.WriteLine("FileCopyToRootPath : " + Path.Combine(RootPath, fileName)); } } -- Gitblit v1.8.0