Skip to content

Commit 04ac2e7

Browse files
authored
Merge pull request #2502 from strictdoc-project/stanislaw/pipe_files
fix(FileFinder): ignore Linux pipe files
2 parents b698af5 + ca68cb4 commit 04ac2e7

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

docs/strictdoc_04_release_notes.sdoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ STATEMENT: >>>
4545
This document maintains a record of all changes to StrictDoc since November 2023. It serves as a user-friendly version of the changelog, complementing the automatically generated, commit-by-commit changelog available as GitHub releases: `StrictDoc Releases <https://github.com/strictdoc-project/strictdoc/releases>`_.
4646
<<<
4747

48+
[[SECTION]]
49+
MID: c2ee8e32a2324963a90e7ba81f95ee0d
50+
TITLE: Unreleased
51+
52+
[TEXT]
53+
MID: 12345f3b28ea4bfe9ca8afe6b21826a8
54+
STATEMENT: >>>
55+
An edge case has been fixed where StrictDoc's FileFinder was detecting Linux pipe files that could not be processed meaningfully by StrictDoc's source file generator. With this release, such files will be ignored.
56+
<<<
57+
58+
[[/SECTION]]
59+
4860
[[SECTION]]
4961
MID: 403c9f0ad6c34b50b25133f1d9357335
5062
TITLE: 0.14.0 (2025-10-05)

strictdoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from strictdoc.core.environment import SDocRuntimeEnvironment
22

3-
__version__ = "0.14.0"
3+
__version__ = "0.14.1a1"
44

55

66
environment = SDocRuntimeEnvironment(__file__)

strictdoc/core/file_tree.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ def find_files_with_extensions(
166166
continue
167167

168168
full_file_path = os.path.join(current_root_path, file)
169+
170+
# A known edge case: A file is found by os.walk(), but it is a
171+
# Linux pipe file which fails an os.path.isfile() check.
172+
# It seems to be safe to ignore this and possibly other cases
173+
# here without writing any test for this case.
174+
if not os.path.isfile(full_file_path): # pragma: no cover
175+
continue
176+
169177
rel_file_path = os.path.join(current_root_relative_path, file)
170178

171179
if path_filter_excludes.match(rel_file_path):

0 commit comments

Comments
 (0)