Skip to content

Commit 84ff525

Browse files
Bugfix: Arduino Data Dir nil dereference
Bug: When dataDir is an empty string: paths.New() returns nil. next Canonical() get's called dereferencing nil. Fix: Ignore
1 parent 937ad84 commit 84ff525

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: ls/ls.go

+4
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,10 @@ func (ls *INOLanguageServer) extractDataFolderFromArduinoCLI(logger jsonrpc.Func
14871487
}
14881488

14891489
dataDirPath := paths.New(dataDir)
1490+
if dataDirPath == nil {
1491+
return nil, nil
1492+
}
1493+
14901494
return dataDirPath.Canonical(), nil
14911495
}
14921496

0 commit comments

Comments
 (0)