mirror of
https://github.com/bolucat/Archive.git
synced 2025-10-06 08:39:35 +08:00
Update On Tue Oct 22 20:35:11 CEST 2024
This commit is contained in:
@@ -182,7 +182,7 @@ namespace ServiceLib.ViewModels
|
||||
{
|
||||
_updateView?.Invoke(EViewAction.DispatcherCheckUpdateFinished, false);
|
||||
await Task.Delay(2000);
|
||||
UpgradeCore();
|
||||
await UpgradeCore();
|
||||
|
||||
if (_lstUpdated.Any(x => x.CoreType == _v2rayN && x.IsFinished == true))
|
||||
{
|
||||
@@ -228,7 +228,7 @@ namespace ServiceLib.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private void UpgradeCore()
|
||||
private async Task UpgradeCore()
|
||||
{
|
||||
foreach (var item in _lstUpdated)
|
||||
{
|
||||
@@ -266,6 +266,15 @@ namespace ServiceLib.ViewModels
|
||||
FileManager.ZipExtractToFile(fileName, toPath, _config.guiItem.ignoreGeoUpdateCore ? "geo" : "");
|
||||
}
|
||||
|
||||
if (Utils.IsLinux())
|
||||
{
|
||||
var filesList = (new DirectoryInfo(toPath)).GetFiles().Select(u => u.FullName).ToList();
|
||||
foreach (var file in filesList)
|
||||
{
|
||||
await Utils.SetLinuxChmod(Path.Combine(toPath, item.CoreType));
|
||||
}
|
||||
}
|
||||
|
||||
UpdateView(item.CoreType, ResUI.MsgUpdateV2rayCoreSuccessfully);
|
||||
|
||||
if (File.Exists(fileName))
|
||||
|
Reference in New Issue
Block a user