Skip to content

Commit

Permalink
Use pathSeparator instead of literal char
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Dec 17, 2024
1 parent 8766877 commit 73ec3ba
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ instance Ord ProjectConfigPath where
splitPath = FP.splitPath . normSep where
normSep p =
if buildOS == Windows
then Windows.joinPath $ Windows.splitDirectories [if c == '/' then '\\' else c| c <- p]
else Posix.joinPath $ Posix.splitDirectories [if c == '\\' then '/' else c| c <- p]
then
Windows.joinPath $ Windows.splitDirectories
[if c == Posix.pathSeparator then Windows.pathSeparator else c| c <- p]
else
Posix.joinPath $ Posix.splitDirectories
[if c == Windows.pathSeparator then Posix.pathSeparator else c| c <- p]

aPaths = splitPath <$> as
bPaths = splitPath <$> bs
Expand Down

0 comments on commit 73ec3ba

Please sign in to comment.