This commit is contained in:
2021-12-08 19:18:21 +00:00
parent 6af640380b
commit b7b7e09b81

View File

@@ -812,14 +812,13 @@ namespace AyaNova.Util
return string.Empty; return string.Empty;
} }
//only applies if there is a % in it //Linux ~ home folder special handling here
//"A string containing the names of zero or more environment variables. Each environment variable is quoted with the percent sign character (%)." if (path.Contains('~'))
{
if(!path.Contains('%')){ //return because no environment variables are expended on linux, this is the only special character
return path; return path.Replace("~", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
} }
return System.Environment.ExpandEnvironmentVariables(path); return System.Environment.ExpandEnvironmentVariables(path);
} }