aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-14 18:37:28 -0500
committerGitHub <noreply@github.com>2026-05-14 18:37:28 -0500
commit9bb822122182b88579b0498bb0ebfca94282e9b4 (patch)
tree035d38c432787f33d1e4d0037e200b8ccb41cefa /src/slskd/Core
parent427a3de7bf2987bd15159f1f3b50bee1ae95e677 (diff)
parente6cc409dbe1818b3cd60b2fe7241428684e2665f (diff)
downloadslskd-9bb822122182b88579b0498bb0ebfca94282e9b4.tar.gz
Merge pull request #1729 from slskd/paths-again
Paths again
Diffstat (limited to 'src/slskd/Core')
-rw-r--r--src/slskd/Core/Options.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index 1ca5b84a..51b3cab1 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -198,6 +198,7 @@ namespace slskd
[Argument('i', "instance-name")]
[EnvironmentVariable("INSTANCE_NAME")]
[Description("optional; a unique name for this instance")]
+ [DisallowedCharacters('/', '\\')]
[RequiresRestart]
public string InstanceName { get; init; } = "default";
@@ -654,6 +655,7 @@ namespace slskd
[Description("the name for this agent")]
[StringLength(255, MinimumLength = 1)]
[NotNullOrWhiteSpace]
+ [DisallowedCharacters('/', '\\')]
[Secret]
public string InstanceName { get; init; }
@@ -765,6 +767,7 @@ namespace slskd
[Argument(default, "incomplete")]
[EnvironmentVariable("INCOMPLETE_DIR")]
[Description("path where incomplete downloads are saved")]
+ [AbsolutePath]
[DirectoryExists(ensureWriteable: true)]
[RequiresRestart]
public string Incomplete { get; init; } = Program.DefaultIncompleteDirectory;
@@ -775,6 +778,7 @@ namespace slskd
[Argument('o', "downloads")]
[EnvironmentVariable("DOWNLOADS_DIR")]
[Description("path where downloaded files are saved")]
+ [AbsolutePath]
[DirectoryExists(ensureWriteable: true)]
[RequiresRestart]
public string Downloads { get; init; } = Program.DefaultDownloadsDirectory;