mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
If it is a Windows WinGet installation, the configuration file is stored in the user directory
Some checks failed
Some checks failed
https://github.com/2dust/v2rayN/issues/6803
This commit is contained in:
parent
e6011cfede
commit
2df412476a
1 changed files with 9 additions and 2 deletions
|
@ -564,13 +564,20 @@ namespace ServiceLib.Common
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var basePath = GetBaseDirectory();
|
||||||
//When this file exists, it is equivalent to having no permission to read and write
|
//When this file exists, it is equivalent to having no permission to read and write
|
||||||
if (File.Exists(Path.Combine(GetBaseDirectory(), "NotStoreConfigHere.txt")))
|
if (File.Exists(Path.Combine(basePath, "NotStoreConfigHere.txt")))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tempPath = Path.Combine(GetBaseDirectory(), "guiTemps");
|
//Check if it is installed by Windows WinGet
|
||||||
|
if (IsWindows() && basePath.Contains("Users") && basePath.Contains("WinGet"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var tempPath = Path.Combine(basePath, "guiTemps");
|
||||||
if (!Directory.Exists(tempPath))
|
if (!Directory.Exists(tempPath))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(tempPath);
|
Directory.CreateDirectory(tempPath);
|
||||||
|
|
Loading…
Reference in a new issue