@@ -131,9 +131,7 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
131
131
var buildPath * paths.Path
132
132
if buildPathArg := req .GetBuildPath (); buildPathArg != "" {
133
133
buildPath = paths .New (req .GetBuildPath ()).Canonical ()
134
- if in , err := buildPath .IsInsideDir (sk .FullPath ); err != nil {
135
- return nil , & arduino.NotFoundError {Message : tr ("Cannot find build path" ), Cause : err }
136
- } else if in && buildPath .IsDir () {
134
+ if in := buildPath .IsInsideDir (sk .FullPath ); in && buildPath .IsDir () {
137
135
if sk .AdditionalFiles , err = removeBuildFromSketchFiles (sk .AdditionalFiles , buildPath ); err != nil {
138
136
return nil , err
139
137
}
@@ -385,9 +383,7 @@ func removeBuildFromSketchFiles(files paths.PathList, build *paths.Path) (paths.
385
383
var res paths.PathList
386
384
ignored := false
387
385
for _ , file := range files {
388
- if in , err := file .IsInsideDir (build ); err != nil {
389
- return nil , & arduino.NotFoundError {Message : tr ("Cannot find build path" ), Cause : err }
390
- } else if ! in {
386
+ if ! file .IsInsideDir (build ) {
391
387
res = append (res , file )
392
388
} else if ! ignored {
393
389
ignored = true
0 commit comments