diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-03-22 18:22:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-22 18:22:08 -0500 |
| commit | 3ebe259d940a5e520e02c37d4427354684e409aa (patch) | |
| tree | 4267c90d7838539c0ee72cbf6a8b882d277ca22a /src/slskd/Program.cs | |
| parent | 865187a892e0201a25bd1ea8b825d4e98da104a3 (diff) | |
| parent | 2d2d8d948fd91a4040fe9e0a85b120a27f9d8b5d (diff) | |
| download | slskd-3ebe259d940a5e520e02c37d4427354684e409aa.tar.gz | |
Merge branch 'master' into master
Diffstat (limited to 'src/slskd/Program.cs')
| -rw-r--r-- | src/slskd/Program.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 49b01516..b7fa47d2 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -208,6 +208,11 @@ namespace slskd public static string LogDirectory { get; private set; } = null; /// <summary> + /// Gets the path where user-defined scripts are stored. + /// </summary> + public static string ScriptDirectory { get; private set; } = null; + + /// <summary> /// Gets a buffer containing the last few log events. /// </summary> public static ConcurrentFixedSizeQueue<LogRecord> LogBuffer { get; } = new ConcurrentFixedSizeQueue<LogRecord>(size: 100); @@ -332,6 +337,7 @@ namespace slskd AppDirectory ??= DefaultAppDirectory; DataDirectory = Path.Combine(AppDirectory, "data"); LogDirectory = Path.Combine(AppDirectory, "logs"); + ScriptDirectory = Path.Combine(AppDirectory, "scripts"); DefaultConfigurationFile = Path.Combine(AppDirectory, $"{AppName}.yml"); DefaultDownloadsDirectory = Path.Combine(AppDirectory, "downloads"); @@ -347,6 +353,7 @@ namespace slskd { VerifyDirectory(AppDirectory, createIfMissing: true, verifyWriteable: true); VerifyDirectory(DataDirectory, createIfMissing: true, verifyWriteable: true); + VerifyDirectory(ScriptDirectory, createIfMissing: true, verifyWriteable: false); VerifyDirectory(DefaultDownloadsDirectory, createIfMissing: true, verifyWriteable: true); VerifyDirectory(DefaultIncompleteDirectory, createIfMissing: true, verifyWriteable: true); } |
