Skip to content

Fix listDirectory() to follow symbolic links#6821

Merged
bentsherman merged 2 commits intomasterfrom
fix/listfiles-follow-symlinks
Feb 10, 2026
Merged

Fix listDirectory() to follow symbolic links#6821
bentsherman merged 2 commits intomasterfrom
fix/listfiles-follow-symlinks

Conversation

@adamrtalbot
Copy link
Collaborator

Summary

  • Make listFiles0() parameterized with a followLinks flag so that listDirectory() follows symbolic links while listFiles() preserves its existing behavior
  • This addresses the review feedback on Fix listFiles() to follow symbolic links #6808, which was reverted due to the wider blast radius of changing listFiles() behavior

Changes

  • listFiles0(self, filter, followLinks) — new boolean followLinks parameter (default false)
  • listFiles() — calls listFiles0 without follow links (unchanged behavior)
  • listDirectory() — calls listFiles0 with followLinks=true

Why only listDirectory()?

listFiles() is called internally by findBinEntries, createLinkImpl, and LocalUpdateRepository. Changing its symlink behavior would silently affect task hashing and other internals. Since listDirectory() is new in 26.04 (#6581), it has no existing callers to break.

Fixes #6807
Supersedes #6808

Test plan

  • listFiles should not follow symlinked directory — verifies listFiles() preserves old behavior
  • listDirectory should follow symlinked directory — verifies listDirectory() follows symlinks
  • All existing FilesExTest tests pass

Make listFiles0() parameterized with a followLinks flag so that
listFiles() preserves its existing behavior (no symlink following)
while listDirectory() follows symbolic links.

This avoids the wider blast radius of changing listFiles() behavior
which affects task hashing via findBinEntries and other internal callers.

Fixes #6807

Generated by Claude Code

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Feb 9, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 2eb9b26
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/698b08a8bf93410008818bde

@bentsherman bentsherman merged commit 1ee59b3 into master Feb 10, 2026
25 checks passed
@bentsherman bentsherman deleted the fix/listfiles-follow-symlinks branch February 10, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

listFiles() does not follow symbolic links

2 participants