2dust 2 months ago
parent
commit
8505f2db96
  1. 4
      v2rayN/ServiceLib/Common/FileManager.cs
  2. 2
      v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs

4
v2rayN/ServiceLib/Common/FileManager.cs

@ -143,6 +143,10 @@ namespace ServiceLib.Common
{
continue;
}
if (file.Extension == file.Name)
{
continue;
}
string targetFilePath = Path.Combine(destinationDir, file.Name);
file.CopyTo(targetFilePath);
}

2
v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs

@ -147,7 +147,7 @@ namespace ServiceLib.ViewModels
var configDirZipTemp = Utils.GetTempPath($"v2rayN_{DateTime.Now:yyyyMMddHHmmss}");
var configDirTemp = Path.Combine(configDirZipTemp, "guiConfigs");
await Task.Run(() => FileManager.CopyDirectory(configDir, configDirTemp, true, "cache.db"));
await Task.Run(() => FileManager.CopyDirectory(configDir, configDirTemp, false, "cache.db"));
var ret = await Task.Run(() => FileManager.CreateFromDirectory(configDirZipTemp, fileName));
await Task.Run(() => Directory.Delete(configDirZipTemp, true));
return ret;

Loading…
Cancel
Save