[Mkdirp] Fix async not being recursive

This commit is contained in:
Ducko 2021-12-11 08:23:29 +00:00
parent 12cbb58784
commit 2b5c3c8baa

View file

@ -8,9 +8,9 @@ const fs = require('fs');
const async = (path, callback) => { // async const async = (path, callback) => { // async
log('Mkdirp', 'Async:', path); log('Mkdirp', 'Async:', path);
fs.mkdir(path, () => { // Ignore errors (already exists) fs.mkdir(path, { recursive: true }, () => { // Ignore errors (already exists)
callback(); callback();
}, { recursive: true }); });
}; };
const sync = (path) => { // sync const sync = (path) => { // sync