From 72e1b4e4626315ebd4b879a68c94e7738fd0473e Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 28 十月 2019 11:00:28 +0800
Subject: [PATCH] 2019-10-28-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs | 38 ++++++++++++++++++++++----------------
1 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
index f7020c4..1a83c35 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -151,7 +151,7 @@
}
//鍒犻櫎鏂囦欢
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var backPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupdeleteDirectory);
foreach (var file in listData)
{
@@ -183,7 +183,7 @@
}
//鍒犻櫎鏂囦欢
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var backPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
foreach (var file in listData)
{
@@ -219,7 +219,7 @@
/// <returns></returns>
public static List<string> GetAutoBackupEditorFile()
{
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var path = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
return GetFileFromDirectory(path);
@@ -231,7 +231,7 @@
/// <returns></returns>
public static List<string> GetAutoBackupDeleteFile()
{
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var path = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupdeleteDirectory);
return GetFileFromDirectory(path);
@@ -269,12 +269,12 @@
/// <param name="fileName">鏂囦欢鐨勫悕瀛�,涓嶅惈璺緞</param>
public static void AddOrEditorFile(string fileName)
{
- if (UserCenterResourse.LocalRootPath == string.Empty)
+ //鏍圭洰褰�
+ string strroot = Common.Config.Instance.FullPath;
+ if (strroot == string.Empty)
{
return;
}
- //鏍圭洰褰�
- string strroot = UserCenterResourse.LocalRootPath;
//鑷姩澶囦唤鐩綍
string strBackPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
@@ -306,12 +306,12 @@
/// <param name="fileName">鏂囦欢鐨勫悕瀛�,涓嶅惈璺緞</param>
public static void DeleteFile(string fileName)
{
- if (UserCenterResourse.LocalRootPath == string.Empty)
+ //鏍圭洰褰�
+ string strroot = Common.Config.Instance.FullPath;
+ if (strroot == string.Empty)
{
return;
}
- //鏍圭洰褰�
- string strroot = UserCenterResourse.LocalRootPath;
//鑷姩鍒犻櫎澶囦唤鐩綍
string strBackPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupdeleteDirectory);
@@ -341,15 +341,15 @@
await HdlShardLogic.Current.SynchronizeDeleteSharedContent();
return 0;
}
- //鍒涘缓涓�涓┖鏂囦欢
- var file = System.IO.File.Create(checkFile);
- file.Close();
//鏆傛椂涓嶆敮鎸佹垚鍛�
if (UserCenterResourse.UserInfo.AuthorityNo == 3)
{
//鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭
await HdlShardLogic.Current.SynchronizeDbSharedContent();
+ //鍒涘缓涓�涓┖鏂囦欢(鏍囪瘑宸茬粡瀹屾垚鍚屾)
+ var file = System.IO.File.Create(checkFile);
+ file.Close();
return 1;
}
@@ -357,14 +357,15 @@
var data = await HdlBackupLogic.Current.GetBackupListNameFromDB(1);
if (data == null)
{
- //寮傚父,鍒犻櫎妫�娴嬫枃浠�
- System.IO.File.Delete(checkFile);
return -1;
}
if (data.Count == 0)
{
//鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭
await HdlShardLogic.Current.SynchronizeDbSharedContent();
+ //鍒涘缓涓�涓┖鏂囦欢(鏍囪瘑宸茬粡瀹屾垚鍚屾)
+ var file = System.IO.File.Create(checkFile);
+ file.Close();
return 1;
}
//鑷姩澶囦唤鍙湁涓�涓�
@@ -390,6 +391,11 @@
//鍚屾鏈嶅姟鍣ㄧ殑鍙栨秷浜嗙殑鍒嗕韩鍐呭
await HdlShardLogic.Current.SynchronizeDeleteSharedContent();
+
+ //鍒涘缓涓�涓┖鏂囦欢(鏍囪瘑宸茬粡瀹屾垚鍚屾)
+ var file2 = System.IO.File.Create(checkFile);
+ file2.Close();
+
return 1;
}
@@ -477,7 +483,7 @@
//鏆備笉鏀寔鎴愬憳
return;
}
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var path = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
List<string> listFile1 = GetFileFromDirectory(path);
--
Gitblit v1.8.0