diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-07-07 18:22:32 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-07-07 18:22:32 -0500 |
| commit | a18bb0366ef70670f91a881e55ef10a73f968337 (patch) | |
| tree | 4dcf3948266ce03b450ac7959f74e0aabbd33ad5 /src/slskd/Transfers | |
| parent | 02444a36017bc094d9f28fa71a782dabb320190d (diff) | |
| parent | 19030c1879c16c3bf132bd65a30c67cb48916394 (diff) | |
| download | slskd-a18bb0366ef70670f91a881e55ef10a73f968337.tar.gz | |
Merge branch 'symlinks' of github.com:slskd/slskd into symlinks
Diffstat (limited to 'src/slskd/Transfers')
| -rw-r--r-- | src/slskd/Transfers/Uploads/UploadService.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slskd/Transfers/Uploads/UploadService.cs b/src/slskd/Transfers/Uploads/UploadService.cs index b906cc06..b5696988 100644 --- a/src/slskd/Transfers/Uploads/UploadService.cs +++ b/src/slskd/Transfers/Uploads/UploadService.cs @@ -16,6 +16,7 @@ // </copyright> using Microsoft.Extensions.Options; +using slskd.Files; using Soulseek; namespace slskd.Transfers.Uploads @@ -212,9 +213,9 @@ namespace slskd.Transfers.Uploads { // if it's local, do a quick check to see if it exists to spare the caller from queueing up if the transfer is // doomed to fail. for remote files, take a leap of faith. - var info = new FileInfo(localFilename); + var info = new FileInfo(localFilename).TryFollowSymlink(); - if (!info.Exists) + if (info?.Exists is null or false) { Shares.RequestScan(); throw new NotFoundException($"The file '{localFilename}' could not be located on disk. A share scan should be performed."); |
