mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Ignore extra spaces in path when not running on Windows
(cherry picked from commit 6d0f10b877912edef21232c64339cc6548d9690e)
This commit is contained in:
@@ -147,14 +147,14 @@ namespace NzbDrone.Common.Extensions
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.Trim() != path)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only check for leading or trailing spaces for path when running on Windows.
|
// Only check for leading or trailing spaces for path when running on Windows.
|
||||||
if (OsInfo.IsWindows)
|
if (OsInfo.IsWindows)
|
||||||
{
|
{
|
||||||
|
if (path.Trim() != path)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var directoryInfo = new DirectoryInfo(path);
|
var directoryInfo = new DirectoryInfo(path);
|
||||||
|
|
||||||
while (directoryInfo != null)
|
while (directoryInfo != null)
|
||||||
|
Reference in New Issue
Block a user