Skip to content

Commit 84378d8

Browse files
committed
Fix for simplyPath not removing trailing directory separators.
1 parent 6756827 commit 84378d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cli/IO.fs

+3-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ module IO =
180180
else joined
181181

182182
let simplifyPath (path: string): string =
183-
Path.GetFullPath(path)
183+
let simplified = Path.GetFullPath path
184+
if simplified = (Path.DirectorySeparatorChar |> string) then simplified
185+
else simplified.TrimEnd(Path.DirectorySeparatorChar)
184186

185187
/// Finds the largest common path across multiple paths.
186188
let findLargestCommonPath (paths: string list) : string =

0 commit comments

Comments
 (0)