Skip to content

Commit 5b4ce38

Browse files
committed
PR feedback: comment about Path.GetFullPath
1 parent 4cff9e7 commit 5b4ce38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/FSharpLint.Client/LSPFSharpLintServiceTypes.fs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module FSharpLint.Client.LSPFSharpLintServiceTypes
1+
module FSharpLint.Client.LSPFSharpLintServiceTypes
22

33
open System
44
open System.Diagnostics
@@ -19,7 +19,9 @@ type Folder = private Folder of string
1919
with
2020
static member from (filePath: string) =
2121
if File.Exists(filePath) then
22-
let folder = Path.GetFullPath(filePath) |> Path.GetDirectoryName
22+
let folder =
23+
Path.GetFullPath(filePath) // to resolves path like /foo/bar/../baz
24+
|> Path.GetDirectoryName
2325
if DirectoryInfo(folder).Exists then
2426
folder |> Folder |> Some
2527
else

0 commit comments

Comments
 (0)