Skip to content

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

Merged
robhogan merged 1 commit into
react-native-community:mainfrom
robhogan:robhogan/fix-recursive-asset-catalog-creation
Jun 19, 2023
Merged

fix: Potential EEXIST error when iOS asset catalog dir already exists#1976
robhogan merged 1 commit into
react-native-community:mainfrom
robhogan:robhogan/fix-recursive-asset-catalog-creation

Conversation

@robhogan

@robhogan robhogan commented Jun 19, 2023

Copy link
Copy Markdown
Collaborator

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