(BOLT-109) Fix Windows long path support by replacing Dir[] with Find.find#134
Merged
malikparvez merged 1 commit intomainfrom Dec 11, 2025
Merged
(BOLT-109) Fix Windows long path support by replacing Dir[] with Find.find#134malikparvez merged 1 commit intomainfrom
malikparvez merged 1 commit intomainfrom
Conversation
The Dir fails to respect the LongPath, which is enabled on the underlying windows system. This Find equivalent logic, however, does work and is respected. Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com>
46818f6 to
f800902
Compare
malikparvez
approved these changes
Dec 11, 2025
Collaborator
|
Hey. I assume you are going to release this soonish. Would it be possible that you take a look at https://github.com/puppetlabs/forge-ruby/pulls/bastelfreak before doing a release? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Windows long path issue where module extraction fails with
Errno::ENAMETOOLONGwhen paths exceed 260 characters. The root cause: Ruby'sDir[]glob does not respect the WindowsLongPathsEnabledregistry setting.For more information see BOLT-109
PLEASE can you do both a
5.0.5and a6.0.1release fix?Problem
When extracting modules with deep directory structures,
Dir[]inroot_dirmethod fails on Windows even with long paths enabled:This occurs despite
LongPathsEnabledregistry key being set to 1.Solution
Replace
Dir[]withFind.find, which properly respects Windows long path settings:Verification
Environment: Windows Server 2022, Ruby 3.2.5
Before (FAILS):
After (SUCCESS):
Test Results
mainbranch - unrelated to this PR)Impact