Fixed an incorrect node path used for pattern matching when processing middleware nodes

This commit is contained in:
valeros
2020-04-13 16:41:03 +03:00
parent 5ba7753bfa
commit 788351a0cd
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ PlatformIO Core 4
* Fixed PIO Unit Testing for Zephyr RTOS
* Fixed UnicodeDecodeError on Windows when network drive (NAS) is used (`issue #3417 <https://github.com/platformio/platformio-core/issues/3417>`_)
* Fixed an issue when saving libraries in new project results in error "No option 'lib_deps' in section" (`issue #3442 <https://github.com/platformio/platformio-core/issues/3442>`_)
* Fixed an incorrect node path used for pattern matching when processing middleware nodes
4.3.1 (2020-03-20)
~~~~~~~~~~~~~~~~~~

View File

@ -285,7 +285,7 @@ def CollectBuildFiles(
for callback, pattern in env.get("__PIO_BUILD_MIDDLEWARES", []):
tmp = []
for node in sources:
if pattern and not fnmatch.fnmatch(node.get_path(), pattern):
if pattern and not fnmatch.fnmatch(node.srcnode().get_path(), pattern):
tmp.append(node)
continue
n = callback(node)