Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dirEntries more robust to changes of the working directory #10706

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

0xEAB
Copy link
Member

@0xEAB 0xEAB commented Mar 23, 2025

Improves the situation with #9584 in a backwards compatible fashion.
Fixing the case where a DirEntry is implicitly converted to a relative path in form of a string would introduce a breaking change – as far as I can tell at least.

This revises the “bad” parts of #10666/#6125 – my previous PR and the other PR that it attempted to salvage, respectively.
Also inherits the “good” parts of #10669 which is another PR from me that couldn’t keep up with its goal of actually closing the bug report.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @0xEAB!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#10706"

@0xEAB
Copy link
Member Author

0xEAB commented Mar 23, 2025

Does not use fdopendir+openat on applicable systems (yet).

@0xEAB 0xEAB force-pushed the more-robust-dirEntries branch from ae555fb to 5b52a2a Compare March 23, 2025 23:48
@0xEAB 0xEAB force-pushed the more-robust-dirEntries branch from 5b52a2a to 0cf64dd Compare March 24, 2025 00:01
@thewilsonator
Copy link
Contributor

ping me when this is good to go.

@0xEAB
Copy link
Member Author

0xEAB commented Mar 30, 2025

I’ve hinted it in #10718 (comment) already; I’m looking forward to replace this PR, too.

I’m currently working on the Windows version of a more easily digestible replacement to this PR.
In the unlikely case that someone is curious about it, it’s here https://github.com/0xEAB/phobos/tree/DirEntry-ng/windows.

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.

3 participants