Skip to content

Commit 9a43f9d

Browse files
committed
PR feedback: Path.GetFullPath readability
1 parent b1692fb commit 9a43f9d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/FSharpLint.Client/LSPFSharpLintServiceTypes.fs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ type Folder = private Folder of string
1919
with
2020
static member from (filePath: string) =
2121
if File.Exists(filePath) then
22-
let folder =
23-
Path.GetFullPath(filePath) // to resolves path like /foo/bar/../baz
24-
|> Path.GetDirectoryName
22+
// Path.GetFullPath to resolve path like /foo/bar/../baz
23+
let folder = ((filePath |> Path.GetFullPath |> FileInfo).Directory).FullName
2524
if DirectoryInfo(folder).Exists then
2625
folder |> Folder |> Some
2726
else

0 commit comments

Comments
 (0)