diff --git a/src/arduino.cc/builder/fail_if_buildpath_equals_sketchpath.go b/src/arduino.cc/builder/fail_if_buildpath_equals_sketchpath.go index b4fc963e..f2c31c45 100644 --- a/src/arduino.cc/builder/fail_if_buildpath_equals_sketchpath.go +++ b/src/arduino.cc/builder/fail_if_buildpath_equals_sketchpath.go @@ -53,12 +53,7 @@ func (s *FailIfBuildpathEqualsSketchPath) Run(context map[string]interface{}) er } sketchPath = filepath.Dir(sketchPath) - rel, err := filepath.Rel(buildPath, sketchPath) - if err != nil { - return utils.WrapError(err) - } - - if rel == "." { + if buildPath == sketchPath { return utils.Errorf(context, "Sketch cannot be located in build path. Please specify a different build path") }