Поправки багов в создании каталогов

This commit is contained in:
Book Pauk
2019-01-04 20:50:18 +07:00
parent e0b756091b
commit fca1967bb4
3 changed files with 8 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ function statPathSync(path) {
function mkDirIfNotExistsSync(path) {
let exists = statPathSync(path);
if (!exists) {
fs.mkdirSync(path, {recursive: true, mode: 0o755});
fs.mkdirSync(path, {recursive: true});
} else if (!exists.isDirectory()) {
throw new Error(`Not a directory: ${path}`);
}