Skip to content

Commit

Permalink
Make drive splitting total
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidM-D committed Apr 30, 2019
1 parent 7024e38 commit 1509628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions haskell-lsp-types/src/Language/Haskell/LSP/Types/Uri.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ platformAdjustToUriPath :: SystemOS -> FilePath -> String
platformAdjustToUriPath systemOS srcPath =
if systemOS /= windowsOS then srcPath
else let
drive:rest = FPW.splitDirectories srcPath
(drive,rest) = FPW.splitDrive srcPath
leaveCharUnescaped = (/= ':')
removePathSeparator = filter (not . FPW.isPathSeparator)
escapedDrive = removePathSeparator $ escapeURIString leaveCharUnescaped drive
in '/' : FPP.joinPath (escapedDrive : rest)
in '/' : FPP.joinPath [escapedDrive, rest]

0 comments on commit 1509628

Please sign in to comment.