Skip to content

Commit 0185964

Browse files
committed
Exclude files like .main.cpp from builds
1 parent 4a5ac14 commit 0185964

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/toolchains/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,13 @@ def closure (dir_path=dir_path, base_path=base_path):
731731
# A helper function for both scan_resources and _add_dir. _add_file adds one file
732732
# (*file_path*) to the resources object based on the file type.
733733
def _add_file(self, file_path, resources, base_path, exclude_paths=None):
734-
resources.file_basepath[file_path] = base_path
735734

736-
if self.is_ignored(relpath(file_path, base_path)):
735+
if (self.is_ignored(relpath(file_path, base_path)) or
736+
basename(file_path).startswith(".")):
737737
resources.ignore_dir(relpath(file_path, base_path))
738738
return
739739

740+
resources.file_basepath[file_path] = base_path
740741
_, ext = splitext(file_path)
741742
ext = ext.lower()
742743

0 commit comments

Comments
 (0)