| | |
| | | //生成文件
|
| | | foreach (string fileName in listDbFile)
|
| | | {
|
| | | var data = this.GetShardFileContent(fileName);
|
| | | Global.WriteFileByBytesByHomeId(fileName, data);
|
| | | var oldPath = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
|
| | | var newPath = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
|
| | | System.IO.File.Copy(oldPath, newPath, true);
|
| | |
|
| | | if (fileName.StartsWith("Room_") == true)
|
| | | {
|
| | | //房间文件特殊处理
|
| | |
| | | var listLocalFile = Global.FileListByHomeId();
|
| | | foreach (string fileName in listLocalFile)
|
| | | {
|
| | | if (fileName == DirNameResourse.ShardFloorFile)
|
| | | {
|
| | | //楼层文件
|
| | | var varData = Global.ReadFileByHomeId(fileName);
|
| | | var dicFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(Encoding.UTF8.GetString(varData));
|
| | | Common.Config.Instance.Home.FloorDics = dicFloor;
|
| | | Common.Config.Instance.Home.Save(false);
|
| | |
|
| | | Global.DeleteFilebyHomeId(fileName);
|
| | | }
|
| | |
|
| | | if (listShardFile.Contains(fileName) == true)
|
| | | {
|
| | | //本地的这个文件还分享着,没有问题
|
| | | continue;
|
| | | }
|
| | |
|
| | | //检测本地设备文件,是否存在已经取消了共享了的
|
| | | if (fileName.StartsWith(Common.LocalDevice.deviceFirstName) == true)
|
| | | if (fileName.StartsWith("Device_") == true)
|
| | | {
|
| | | //删除掉这个设备文件
|
| | | Global.DeleteFilebyHomeId(fileName);
|