Skip to content

fix: add existsSync guard in hasExactCasing before readdirSync - #14

Open
rupertsworld wants to merge 1 commit into
mainfrom
fix/issue-13
Open

rupertsworld wants to merge 1 commit into
mainfrom
fix/issue-13

Conversation

@rupertsworld

Copy link
Copy Markdown
Member

Summary

Adds a defensive existsSync guard in hasExactCasing before calling readdirSync, matching the pattern already used in ensureDirectoryCasing. This prevents ENOENT errors when parent directories do not yet exist during sync.

Changes

  • Added existsSync(current) check in hasExactCasing loop, returning false if a parent directory segment does not exist (instead of crashing on readdirSync)

Testing

All 136 unit and integration tests pass.

Fixes #13

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.

sync fails on first pull: ensureDirectoryCasing calls readdirSync before mkdir

1 participant