Merge pull request #1754 from Yurunsoft/fix-autorun

Fix autorun
pull/1813/head
2dust 2021-09-29 20:10:34 +08:00 committed by GitHub
commit dc72c949c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -536,7 +536,7 @@ namespace v2rayN
try
{
string exePath = GetExePath();
RegWriteValue(autoRunRegPath, autoRunName, run ? exePath : "");
RegWriteValue(autoRunRegPath, autoRunName, run ? ("\"" + exePath + "\"") : "");
}
catch
{
@ -553,7 +553,7 @@ namespace v2rayN
{
string value = RegReadValue(autoRunRegPath, autoRunName, "");
string exePath = GetExePath();
if (value?.Equals(exePath) == true)
if (value?.Equals(exePath) == true || value?.Equals("\"" + exePath + "\"") == true)
{
return true;
}