aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Relay
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-06-06 11:15:20 -0500
committerGitHub <noreply@github.com>2026-06-06 11:15:20 -0500
commitec836b73cf40226d7a754b42762f4dab44b97749 (patch)
tree06030fad73ed32f4701f88a2dc492f83e7fc8a81 /src/slskd/Relay
parent2e3fd1d2f66a9f5ec2b1ec80d6c19348529cab63 (diff)
parentd35ac4573e2ac5817af3a2b9a6025d41959b9caf (diff)
downloadslskd-ec836b73cf40226d7a754b42762f4dab44b97749.tar.gz
Merge pull request #1746 from slskd/destination
Add options providing granular control over download location
Diffstat (limited to 'src/slskd/Relay')
-rw-r--r--src/slskd/Relay/API/Controllers/RelayController.cs2
-rw-r--r--src/slskd/Relay/RelayClient.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Relay/API/Controllers/RelayController.cs b/src/slskd/Relay/API/Controllers/RelayController.cs
index fdc6dbe6..ddb8d0b0 100644
--- a/src/slskd/Relay/API/Controllers/RelayController.cs
+++ b/src/slskd/Relay/API/Controllers/RelayController.cs
@@ -345,7 +345,7 @@ namespace slskd.Relay
}
Directory.CreateDirectory(FileSafety.CombineSafely(Path.GetTempPath(), Program.AppName));
- var temp = FileSafety.CombineSafely(Path.GetTempPath(), Program.AppName, $"share_{agentName.ReplaceInvalidFileNameCharacters()}_{Path.GetRandomFileName()}.db");
+ var temp = FileSafety.CombineSafely(Path.GetTempPath(), Program.AppName, $"share_{FileSafety.SanitizeFilename(agentName)}_{Path.GetRandomFileName()}.db");
try
{
diff --git a/src/slskd/Relay/RelayClient.cs b/src/slskd/Relay/RelayClient.cs
index 974ca71e..5c5f9d38 100644
--- a/src/slskd/Relay/RelayClient.cs
+++ b/src/slskd/Relay/RelayClient.cs
@@ -484,7 +484,7 @@ namespace slskd.Relay
// if the controller is Windows and the agent is Linux or vice versa, we need to translate the filename to the
// local OS or we're going to get funny results when we go to write the file
- destinationFile = destinationFile.LocalizePath();
+ destinationFile = FileSafety.LocalizePath(destinationFile);
await Retry.Do(task: async () =>
{