diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-01-01 23:56:32 +0100 |
|---|---|---|
| committer | Vasily <JustAMan@users.noreply.github.com> | 2019-01-02 02:30:59 +0300 |
| commit | 76d6b1fc2aa8d448803ecf874e7a37a9b6afef9e (patch) | |
| tree | 1572761e00addb8edbec7b99d916bf3736d5db31 /Jellyfin.Server/Program.cs | |
| parent | 9ccc259c99b11469cd93cb3e15ad2f69f54f0b46 (diff) | |
Ensure log dir exists
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 73c7a0c7c..6f3c8c317 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -130,6 +130,8 @@ namespace Jellyfin.Server string logDir = Environment.GetEnvironmentVariable("JELLYFIN_LOG_DIR");
if (string.IsNullOrEmpty(logDir)){
logDir = Path.Combine(programDataPath, "logs");
+ // Ensure logDir exists
+ Directory.CreateDirectory(logDir);
// $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager
Environment.SetEnvironmentVariable("JELLYFIN_LOG_DIR", logDir);
}
|
