mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-03 14:24:20 +01:00
Ignore extra spaces in path when not running on Windows
(cherry picked from commit 6d0f10b877912edef21232c64339cc6548d9690e)
This commit is contained in:
parent
14250e9634
commit
13c538ff58
1 changed files with 5 additions and 5 deletions
|
|
@ -147,14 +147,14 @@ public static bool IsPathValid(this string path, PathValidationType validationTy
|
|||
return false;
|
||||
}
|
||||
|
||||
if (path.Trim() != path)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only check for leading or trailing spaces for path when running on Windows.
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
if (path.Trim() != path)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var directoryInfo = new DirectoryInfo(path);
|
||||
|
||||
while (directoryInfo != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue