diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-03-02 22:10:01 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-02 22:10:01 -0600 |
| commit | 07b0ea98eb2b5ef44b33754d7a3f7b098f6a8987 (patch) | |
| tree | 33a42d72316b7d312c25c44a938554af1430a058 /src/slskd/Program.cs | |
| parent | a966dbd2e9d12b3bc6df63c9a3d58fbf074f2537 (diff) | |
| parent | be824b6b4af939f3a07752adc51405bf71e44ff2 (diff) | |
| download | slskd-07b0ea98eb2b5ef44b33754d7a3f7b098f6a8987.tar.gz | |
Merge branch 'master' into patch-1
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); } |
