nav tabs on admin dashboard
This commit is contained in:
33
node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
generated
vendored
33
node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
generated
vendored
@@ -31,25 +31,20 @@ function mkdirsSync (p, opts, made) {
|
||||
xfs.mkdirSync(p, mode)
|
||||
made = made || p
|
||||
} catch (err0) {
|
||||
switch (err0.code) {
|
||||
case 'ENOENT':
|
||||
if (path.dirname(p) === p) throw err0
|
||||
made = mkdirsSync(path.dirname(p), opts, made)
|
||||
mkdirsSync(p, opts, made)
|
||||
break
|
||||
|
||||
// In the case of any other error, just see if there's a dir
|
||||
// there already. If so, then hooray! If not, then something
|
||||
// is borked.
|
||||
default:
|
||||
let stat
|
||||
try {
|
||||
stat = xfs.statSync(p)
|
||||
} catch (err1) {
|
||||
throw err0
|
||||
}
|
||||
if (!stat.isDirectory()) throw err0
|
||||
break
|
||||
if (err0.code === 'ENOENT') {
|
||||
if (path.dirname(p) === p) throw err0
|
||||
made = mkdirsSync(path.dirname(p), opts, made)
|
||||
mkdirsSync(p, opts, made)
|
||||
} else {
|
||||
// In the case of any other error, just see if there's a dir there
|
||||
// already. If so, then hooray! If not, then something is borked.
|
||||
let stat
|
||||
try {
|
||||
stat = xfs.statSync(p)
|
||||
} catch (err1) {
|
||||
throw err0
|
||||
}
|
||||
if (!stat.isDirectory()) throw err0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user