fixup! Fixed: Assume category path from qBittorent starting with '//' is a Windows UNC path

This commit is contained in:
Bogdan 2024-07-18 19:59:07 +03:00
commit f1b3a4fcf3
2 changed files with 2 additions and 2 deletions

View file

@ -578,7 +578,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
Mocker.GetMock<IQBittorrentProxy>()
.Setup(s => s.GetLabels(It.IsAny<QBittorrentSettings>()))
.Returns(new Dictionary<string, QBittorrentLabel>
{ { "tv", new QBittorrentLabel { Name = "tv", SavePath = "//server/store/downloads" } } });
{ { "music", new QBittorrentLabel { Name = "music", SavePath = "//server/store/downloads" } } });
var result = Subject.GetStatus();

View file

@ -379,7 +379,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
if (savePath.StartsWith("//"))
{
_logger.Trace("Replacing double forward slashes in path '{0}'. If this is not meant to be a Windows UNC path fix the 'Save Path' in qBittorrent's {1} category", savePath, Settings.TvCategory);
_logger.Trace("Replacing double forward slashes in path '{0}'. If this is not meant to be a Windows UNC path fix the 'Save Path' in qBittorrent's {1} category", savePath, Settings.MusicCategory);
savePath = savePath.Replace('/', '\\');
}