aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-06-04 07:48:47 -0500
committerJP Dillingham <jp@dillingham.me>2026-06-04 07:48:47 -0500
commit7e0bc2227cc8593b65e3acd587cbc783e561ca6a (patch)
treed3646d726ac543320a7513387c0342c57809bcda /src/slskd/Transfers
parent78561f600754241efdf06c0fcee5ffdbdccda1b6 (diff)
parent9a08d5029880c2be008685990f0c83f221ec0e75 (diff)
downloadslskd-7e0bc2227cc8593b65e3acd587cbc783e561ca6a.tar.gz
Merge branch 'destination' of github.com:slskd/slskd into destination
Diffstat (limited to 'src/slskd/Transfers')
-rw-r--r--src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs2
-rw-r--r--src/slskd/Transfers/Downloads/DownloadService.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
index e569df30..fe34bfec 100644
--- a/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
+++ b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
@@ -106,7 +106,7 @@ public record EnqueueDownloadBatchOptions
/// <summary>
/// The destination directory for the files, relative to the configured download directory.
/// </summary>
- [RelativePath]
+ [RelativePath(OperatingSystem.All)]
[NonTraversingPath]
[String(AllowNull = true, AllowEmpty = false, AllowWhiteSpace = false, MinimumLength = 1)]
public string Destination { get; init; }
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs
index 9e240a7e..84753547 100644
--- a/src/slskd/Transfers/Downloads/DownloadService.cs
+++ b/src/slskd/Transfers/Downloads/DownloadService.cs
@@ -865,7 +865,7 @@ namespace slskd.Transfers.Downloads
return match.Value;
});
- destination = FileSafety.SanitizePath(destination);
+ destination = FileSafety.SanitizePath(destination, replacement: '_', stripRoot: false);
Log.Debug("Derived destination for download of {Filename} from {User}: {Destination} (id: {Id}, configuration: {Pattern}, args: {Args})", FileSafety.GetFileNameSafely(transfer.Filename), transfer.Username, destination, transfer.Id, pattern, new { source_username, source_path, source_directory, batch_id, batch_external_id, search_id, search_text });