浏览代码

Normalize application paths

cvium 4 年之前
父节点
当前提交
70aa7fe77d
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Jellyfin.Server/Program.cs

+ 7 - 0
Jellyfin.Server/Program.cs

@@ -527,6 +527,13 @@ namespace Jellyfin.Server
                 }
             }
 
+            // Normalize paths. Only possible with GetFullPath for now - https://github.com/dotnet/runtime/issues/2162
+            dataDir = Path.GetFullPath(dataDir);
+            logDir = Path.GetFullPath(logDir);
+            configDir = Path.GetFullPath(configDir);
+            cacheDir = Path.GetFullPath(cacheDir);
+            webDir = Path.GetFullPath(webDir);
+
             // Ensure the main folders exist before we continue
             try
             {