Update MainFormHandler.cs

pull/2077/head
2dust 2022-01-23 19:16:24 +08:00
parent 5b9cdec156
commit f84e538b6a
1 changed files with 3 additions and 2 deletions

View File

@ -185,15 +185,16 @@ namespace v2rayN.Handler
public void BackupGuiNConfig(Config config, bool auto = false) public void BackupGuiNConfig(Config config, bool auto = false)
{ {
string fileName = string.Empty; string fileName = $"guiNConfig_{DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_fff")}.json";
if (auto) if (auto)
{ {
fileName = Utils.GetTempPath($"guiNConfig{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.json"); fileName = Utils.GetTempPath(fileName);
} }
else else
{ {
SaveFileDialog fileDialog = new SaveFileDialog SaveFileDialog fileDialog = new SaveFileDialog
{ {
FileName = fileName,
Filter = "guiNConfig|*.json", Filter = "guiNConfig|*.json",
FilterIndex = 2, FilterIndex = 2,
RestoreDirectory = true RestoreDirectory = true