delete temp file

This commit is contained in:
2dust 2023-01-04 11:02:43 +08:00
parent cb5d8b405b
commit 00ab4f2a7d
2 changed files with 8 additions and 0 deletions

View file

@ -278,6 +278,8 @@ namespace v2rayN.Handler
string targetPath = Utils.GetBinPath($"{geoName}.dat", (ECoreType)Enum.Parse(typeof(ECoreType), it)); string targetPath = Utils.GetBinPath($"{geoName}.dat", (ECoreType)Enum.Parse(typeof(ECoreType), it));
File.Copy(fileName, targetPath, true); File.Copy(fileName, targetPath, true);
}); });
File.Delete(fileName);
//_updateFunc(true, ""); //_updateFunc(true, "");
} }
} }

View file

@ -8,6 +8,7 @@ using ReactiveUI;
using ReactiveUI.Fody.Helpers; using ReactiveUI.Fody.Helpers;
using Splat; using Splat;
using System.Drawing; using System.Drawing;
using System.IO;
using System.Reactive; using System.Reactive;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Text; using System.Text;
@ -1285,6 +1286,11 @@ namespace v2rayN.ViewModels
Reload(); Reload();
_noticeHandler?.SendMessage(ResUI.MsgUpdateV2rayCoreSuccessfully); _noticeHandler?.SendMessage(ResUI.MsgUpdateV2rayCoreSuccessfully);
if (File.Exists(fileName))
{
File.Delete(fileName);
}
} }
}; };
(new UpdateHandle()).CheckUpdateCore(type, _config, _updateUI, _config.checkPreReleaseUpdate); (new UpdateHandle()).CheckUpdateCore(type, _config, _updateUI, _config.checkPreReleaseUpdate);