Skip to content

fix: RollingFileWriteStream not recursively creating directory - #96

Merged
lamweili merged 2 commits into
masterfrom
fixes-RollingFileWriteStream
Mar 2, 2022
Merged

lamweili merged 2 commits into
masterfrom
fixes-RollingFileWriteStream

Conversation

@lamweili

@lamweili lamweili commented Mar 2, 2022 •

Copy link
Copy Markdown
Contributor

Fixes log4js-node/log4js-node#1189

To provide backward compatibility for NodeJS < 10.12.0.


fs-extra@10.0.0 uses the recursive option in fs.mkdirSync to overcome the EEXIST error.
https://github.com/jprichardson/node-fs-extra/blob/7edcb16a06e041826af3303f961866bf3b243dae/lib/mkdirs/make-dir.js#L25

The recursive option is only present from NodeJS >=10.12.0
(src: https://nodejs.org/api/fs.html#fsmkdirsyncpath-options)

@lamweili lamweili added this to the 3.0.3 milestone Mar 2, 2022
@lamweili
lamweili merged commit c8d037c into master Mar 2, 2022
@lamweili
lamweili deleted the fixes-RollingFileWriteStream branch March 2, 2022 15:39
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.

file appender fails with EEXIST

1 participant