Fixed: Replace duplicate slashes from file names when importing

Fixes #3470
This commit is contained in:
gl3nni3
2020-01-05 02:52:45 +01:00
committed by ta264
parent 0d3798b8b1
commit 921bfdb20d
2 changed files with 16 additions and 1 deletions
+7 -1
View File
@@ -85,7 +85,13 @@ namespace NzbDrone.Common.Disk
case OsPathKind.Windows:
return path.Replace('/', '\\');
case OsPathKind.Unix:
return path.Replace('\\', '/');
path = path.Replace('\\', '/');
while (path.Contains("//"))
{
path = path.Replace("//", "/");
}
return path;
}
return path;