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

fix: Potential EEXIST error when iOS asset catalog dir already exists #1976

Conversation

robhogan
Copy link
Collaborator

@robhogan robhogan commented Jun 19, 2023

Summary:

#1971 sought to replace fs-extra with native fs APIs but missed the behaviour difference of the subtly-differently-named API. fsExtra.mkdirsSync operates like mkdir -p - recursively creating non-existent directories, and not complaining when a directory already exists.

This is the behaviour of fs.mkdirSync if and only if recursive is set.

If recursive is false and the directory exists, an EEXIST error occurs.

CC @huntie

Test Plan:

Restores previous behaviour

@robhogan robhogan merged commit b31ade1 into react-native-community:main Jun 19, 2023
@robhogan robhogan deleted the robhogan/fix-recursive-asset-catalog-creation branch June 19, 2023 10:57
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.

2 participants