mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-08 04:50:56 +02:00
Fixed: Ensure trailing slash is removed from drive letters when updating Plex Media Server
Closes #8414
This commit is contained in:
parent
b94cf9b3b9
commit
d8698d1c28
1 changed files with 3 additions and 2 deletions
|
|
@ -141,8 +141,9 @@ private void UpdateSectionPath(string seriesRelativePath, PlexSection section, P
|
|||
var separator = location.Path.Contains('\\') ? "\\" : "/";
|
||||
var locationRelativePath = seriesRelativePath.Replace("\\", separator).Replace("/", separator);
|
||||
|
||||
// Plex location paths trim trailing extraneous separator characters, so it doesn't need to be trimmed
|
||||
var pathToUpdate = $"{location.Path}{separator}{locationRelativePath}";
|
||||
// Plex location paths trim trailing extraneous separator characters,
|
||||
// unless it's a Windows drive letter (S:\) that needs to be trimmed.
|
||||
var pathToUpdate = $"{location.Path.TrimEnd(separator)}{separator}{locationRelativePath}";
|
||||
|
||||
_logger.Debug("Updating section location, {0}", location.Path);
|
||||
_plexServerProxy.Update(section.Id, pathToUpdate, settings);
|
||||
|
|
|
|||
Loading…
Reference in a new issue