mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-18 13:35:47 +00:00
Use cross-platform replace fallback for subscription usage store
This commit is contained in:
parent
6951c17486
commit
b1828ffb12
1 changed files with 8 additions and 1 deletions
|
|
@ -131,7 +131,14 @@ public sealed class SubscriptionInfoManager
|
||||||
File.WriteAllText(tmp, txt);
|
File.WriteAllText(tmp, txt);
|
||||||
if (File.Exists(_storeFile))
|
if (File.Exists(_storeFile))
|
||||||
{
|
{
|
||||||
File.Replace(tmp, _storeFile, null);
|
if (OperatingSystem.IsWindows())
|
||||||
|
{
|
||||||
|
File.Replace(tmp, _storeFile, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File.Move(tmp, _storeFile, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue