Skip to content

Commit 4d38e6b

Browse files
committed
Use os specific separators
1 parent f86d274 commit 4d38e6b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/IronyModManager.Services/ModService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,9 @@ protected virtual ParsedSearchResult CleanSearchResult(ISearchParserResult parse
747747
/// <returns>IEnumerable&lt;IModInstallationResult&gt;.</returns>
748748
protected virtual IEnumerable<IModInstallationResult> GetAllModDescriptors(string path, ModSource modSource, ModDescriptorType modDescriptorType)
749749
{
750-
bool IsSubPath(string path, string potentialParent)
750+
static bool IsSubPath(string path, string potentialParent)
751751
{
752-
return path.StartsWith(potentialParent.TrimEnd('\\') + "\\", StringComparison.OrdinalIgnoreCase);
752+
return path.StartsWith(potentialParent.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase);
753753
}
754754

755755
// Json metadata doesn't support zips to ignore them

0 commit comments

Comments
 (0)