diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 55f1b7d1..4a8e58fb 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -163,7 +163,13 @@ class LibBuilderBase(object): p2 = p2.lower() if p1 == p2: return True - return os.path.commonprefix((p1 + os.path.sep, p2)) == p1 + os.path.sep + p1 = p1 + os.path.sep + if os.path.commonprefix([p1, p2]) == p1: + return True + # try to resolve paths + p1 = os.path.os.path.realpath(p1) + p2 = os.path.os.path.realpath(p2) + return os.path.commonprefix([p1, p2]) == p1 @property def name(self):