1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Fixed: Ensure trailing slash is removed from drive letters when updating Plex Media Server

Closes #8414
This commit is contained in:
Mark McDowall
2026-02-16 09:18:21 -08:00
parent b94cf9b3b9
commit d8698d1c28
@@ -141,8 +141,9 @@ namespace NzbDrone.Core.Notifications.Plex.Server
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);