fix(core): detect case-insensitive overlap for nonexistent cache/data dirs on Windows #103
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!103
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-103"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Djei365 on GitHub · 2026-11-25 22:59 UTC · original
Djei365:fix/windows-cache-data-case-overlap→main· +377 −1 · 2 files · 1 commits · openCloses #55
Problem
The overlap protection introduced in #42 can miss equivalent Windows paths when directory components do not exist yet and differ only in letter case.
For example, on a case-insensitive NTFS directory:
cache_dir = cachedata_dir = CACHE/savesThese paths may overlap once created, potentially exposing persistent data to cache cleanup.
Solution
The existing
ensure_outside_repopolicy remains unchanged.Validation
-D warnings.All local checks were repeated successfully after rebasing onto upstream main.
Limitations
Local validation was performed on Windows with NTFS. Non-Windows execution, alternative filesystems, and older Windows versions were not tested locally.
Case-sensitivity inference assumes normal directory inheritance and cannot anticipate future filesystem configuration changes.
Acknowledgment
This change builds upon the overlap protection introduced by @LouisRiverstone in #42.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.