Skip to content

Commit f220628

Browse files
committed
Tools: Use logical paths in ignored_dirs
### Description Exporting to GNU ARM Eclipse, E2 Studio, and other exclude-based IDEs currently generats unusable project files online. This is because the list of directories ignored in the scan is inconsistant about what sort of paths are used: logical paths, or phisical paths. This patch makes all paths in ignored_dirs logical. This should fix the excluding tags in these project files. ### Pull request type [x] Fix [ ] Refactor [ ] Target update [ ] Functionality change [ ] Breaking change
1 parent 232543a commit f220628

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/resources/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def add_directory(
379379
base_path = path
380380
if into_path is None:
381381
into_path = path
382-
if self._collect_ignores and path in self.ignored_dirs:
382+
if self._collect_ignores and relpath(path, base_path) in self.ignored_dirs:
383383
self.ignored_dirs.remove(path)
384384
if exclude_paths:
385385
self.add_ignore_patterns(
@@ -407,11 +407,11 @@ def add_directory(
407407
if (any(self._not_current_label(d, t) for t
408408
in self._labels.keys())):
409409
self._label_paths.append((dir_path, base_path, into_path))
410-
self.ignore_dir(dir_path)
410+
self.ignore_dir(relpath(dir_path, base_path))
411411
dirs.remove(d)
412412
elif (d.startswith('.') or d in self._legacy_ignore_dirs or
413413
self._ignoreset.is_ignored(join(root_path, d, ""))):
414-
self.ignore_dir(dir_path)
414+
self.ignore_dir(relpath(dir_path, base_path))
415415
dirs.remove(d)
416416

417417
# Add root to include paths

0 commit comments

Comments
 (0)