diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-05-12 15:29:07 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-05-12 15:29:07 -0500 |
| commit | dbccaefb3c50ae67f671c91f88d088972d6a7f57 (patch) | |
| tree | 62138d58409ec71ac28167b7aebf4befd4bb2ea1 /src/slskd/Transfers | |
| parent | e4c20ae1a67dc6d03db6f3a6f6e8eac1c612d3f3 (diff) | |
| download | slskd-dbccaefb3c50ae67f671c91f88d088972d6a7f57.tar.gz | |
preserve remote directory
Diffstat (limited to 'src/slskd/Transfers')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index 8ec7def2..90d40b22 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -1,4 +1,4 @@ -// <copyright file="DownloadService.cs" company="slskd Team"> +// <copyright file="DownloadService.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -318,9 +318,9 @@ namespace slskd.Transfers.Downloads // argue both ways for that being the correct behavior. revisit this later. var finalFilename = Files.MoveFile( sourceFilename: file.Filename.ToLocalFilename(baseDirectory: OptionsMonitor.CurrentValue.Directories.Incomplete), - destinationDirectory: OptionsMonitor.CurrentValue.Directories.Downloads, + destinationDirectory: System.IO.Path.GetDirectoryName(file.Filename.ToLocalFilename(baseDirectory: OptionsMonitor.CurrentValue.Directories.Downloads)), overwrite: false, - deleteEmptiedParentDirectory: true); + deleteSourceDirectoryIfEmptyAfterMove: true); Log.Debug("Moved file to {Destination}", finalFilename); |
