Skip to content

Commit 4d6cc2f

Browse files
author
Akos Kitta
committed
Fixed path of the gen cpp and compile_flags files.
#28 has fixed the location of the `ino` file but the generated `cpp` and `compile_flags.txt` were not moved into the sketch folder. Touching the `ino` file triggered a `'textDocument/didChange'` event, but the `updateFileData` call failed as the files were not found. This commit moves the files into the appropriate location. Signed-off-by: Akos Kitta <[email protected]>
1 parent 1a22df3 commit 4d6cc2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: handler/builder.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func generateCpp(inoCode []byte, sourcePath, fqbn string) (cppPath string, cppCo
5353
}
5454

5555
// Generate compile_flags.txt
56-
cppPath = filepath.Join(rootTempDir, sketchFileName+".cpp")
57-
flagsPath, err := generateCompileFlags(rootTempDir, inoPath, sourcePath, fqbn)
56+
cppPath = filepath.Join(sketchTempPath, sketchFileName+".cpp")
57+
flagsPath, err := generateCompileFlags(sketchTempPath, inoPath, sourcePath, fqbn)
5858
if err != nil {
5959
return
6060
}
@@ -63,7 +63,7 @@ func generateCpp(inoCode []byte, sourcePath, fqbn string) (cppPath string, cppCo
6363
}
6464

6565
// Generate target file
66-
cppCode, err = generateTargetFile(rootTempDir, inoPath, cppPath, fqbn)
66+
cppCode, err = generateTargetFile(sketchTempPath, inoPath, cppPath, fqbn)
6767
return
6868
}
6969

0 commit comments

Comments
 (0)