Skip to content

Commit 1a01190

Browse files
authored
Merge pull request #25 from lsst/tickets/DM-35446
DM-35446: Follow directory symlinks when walking
2 parents 3c78941 + 773e0dd commit 1a01190

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

doc/changes/DM-35446.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
When walking the local file system symlinks to directories are now followed.

pyproject.toml

-5
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ version = { attr = "lsst.resources.__version__" }
9090
name = "Performance Enhancement"
9191
showcontent = true
9292

93-
[[tool.towncrier.type]]
94-
directory = "other"
95-
name = "Other Changes and Additions"
96-
showcontent = false
97-
9893
[[tool.towncrier.type]]
9994
directory = "misc"
10095
name = "Miscellaneous Changes of Minor Interest"

python/lsst/resources/file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def walk(
349349
if isinstance(file_filter, str):
350350
file_filter = re.compile(file_filter)
351351

352-
for root, dirs, files in os.walk(self.ospath):
352+
for root, dirs, files in os.walk(self.ospath, followlinks=True):
353353
# Filter by the regex
354354
if file_filter is not None:
355355
files = [f for f in files if file_filter.search(f)]

0 commit comments

Comments
 (0)