diff --git a/server/AyaNova/util/FileUtil.cs b/server/AyaNova/util/FileUtil.cs index fbdeb502..b1824770 100644 --- a/server/AyaNova/util/FileUtil.cs +++ b/server/AyaNova/util/FileUtil.cs @@ -349,7 +349,7 @@ namespace AyaNova.Util { //Console.WriteLine("b fileutil:backupfilesdriveavailablespace, backupfilesfolder:", ServerBootConfig.AYANOVA_BACKUP_FILES_PATH); //Console.WriteLine("fileutil:backupfilesdriveavailablespace, backupfilesfolder FULLPATH:", Path.GetFullPath(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH)); - // Console.WriteLine("fileutil:backupfilesdriveavailablespace, backupfilesfolder PATHROOT:", Path.GetPathRoot(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH)); + // Console.WriteLine("fileutil:backupfilesdriveavailablespace, backupfilesfolder PATHROOT:", Path.GetPathRoot(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH)); return new System.IO.DriveInfo(Path.GetPathRoot(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH)).AvailableFreeSpace; } @@ -811,15 +811,14 @@ namespace AyaNova.Util { return string.Empty; } - - //only applies if there is a % in it - //"A string containing the names of zero or more environment variables. Each environment variable is quoted with the percent sign character (%)." - - if(!path.Contains('%')){ - return path; + + //Linux ~ home folder special handling here + if (path.Contains('~')) + { + //return because no environment variables are expended on linux, this is the only special character + return path.Replace("~", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); } - return System.Environment.ExpandEnvironmentVariables(path); }