Skip to content

Conversation

@newhoggy
Copy link

@newhoggy newhoggy commented Aug 8, 2025

This PR introduces the following changes:

  • Symlink Traversal Option Adds a SymlinkBehavior option to recursive directory traversal, allowing users to choose whether to follow symlinks to directories. This makes globbing more robust and configurable, addressing portability and correctness concerns. This is not supported on Windows.
  • Internal Refactor Moves the optimized doesDirectoryExistFast function to a new System.FilePath.Glob.Internal module for better encapsulation and maintainability.
  • API Clarification Renames the optimized directory existence check from doesDirectoryExist to doesDirectoryExistFast to avoid confusion and clarify its purpose.
  • Additional changes Comprehensive tests have been added to ensure that both symlink behaviors produce identical results when no symlinks are present.
  • Documentation updated to clarify the new behavior and options.

This PR is needed to merge haskell-works/tasty-discover#64 on https://github.com/haskell-works/tasty-discover to resolve haskell-works/tasty-discover#38

This PR also resolve #48

@newhoggy newhoggy force-pushed the newhoggy/add-ability-to-follow-symlinks branch 2 times, most recently from 297695f to 2296b01 Compare August 8, 2025 04:43
@newhoggy newhoggy changed the title Add ability to follow symlinks Add ability to follow symlinks during recursive directory traversal Aug 8, 2025
@newhoggy newhoggy force-pushed the newhoggy/add-ability-to-follow-symlinks branch from 19376ae to c8b6dd8 Compare August 8, 2025 06:12
@newhoggy newhoggy force-pushed the newhoggy/add-ability-to-follow-symlinks branch from 998a176 to 31807df Compare August 8, 2025 06:58
@newhoggy newhoggy force-pushed the newhoggy/add-ability-to-follow-symlinks branch from 31807df to 4bf8608 Compare August 8, 2025 15:17
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.

Follow symlinks symlinks

1 participant