Fix Windows implementation of IsSubfolderOf

This commit is contained in:
YoshiRulz 2021-01-29 11:33:39 +10:00
parent 7763d7a1cd
commit 20b93d4690
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,8 @@ namespace BizHawk.Common.PathExtensions
#endif
}
var parentUri = new Uri(parentPath);
for (var childUri = new DirectoryInfo(childPath).Parent; childUri != null; childUri = childUri.Parent)
var parentUri = new Uri(parentPath.RemoveSuffix(Path.DirectorySeparatorChar));
for (var childUri = new DirectoryInfo(childPath); childUri != null; childUri = childUri.Parent)
{
if (new Uri(childUri.FullName) == parentUri) return true;
}