From 5a8b048059074cef04b1fff494369dc25e13adf7 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 11 Feb 2021 14:58:52 +0100 Subject: [PATCH] Fixed improper canonicalization on Windows It seems that if the path doesn't exists (as a file or directory) then it isn't correctly converted into a long form. --- handler/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handler/handler.go b/handler/handler.go index 1426c24..776998d 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -137,7 +137,7 @@ func NewInoHandler(stdio io.ReadWriteCloser, board lsp.Board) *InoHandler { log.Fatalf("Could not create temp folder: %s", err) } else { handler.buildPath = buildPath.Canonical() - handler.buildSketchRoot = buildPath.Join("sketch").Canonical() + handler.buildSketchRoot = handler.buildPath.Join("sketch") } handler.progressHandler = NewProgressProxy(handler.StdioConn) @@ -145,6 +145,7 @@ func NewInoHandler(stdio io.ReadWriteCloser, board lsp.Board) *InoHandler { if enableLogging { log.Println("Initial board configuration:", board) log.Println("Language server build path:", handler.buildPath) + log.Println("Language server build sketch root:", handler.buildSketchRoot) } go handler.rebuildEnvironmentLoop()