1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 13:10:09 +02:00

update dependencies

This commit is contained in:
s2
2018-10-10 15:11:12 +02:00
parent da4083f574
commit 5c55c54b71
90877 changed files with 339776 additions and 33677 deletions

View File

@@ -1,8 +1,10 @@
var fs = require('graceful-fs')
var path = require('path')
var invalidWin32Path = require('./win32').invalidWin32Path
'use strict'
var o777 = parseInt('0777', 8)
const fs = require('graceful-fs')
const path = require('path')
const invalidWin32Path = require('./win32').invalidWin32Path
const o777 = parseInt('0777', 8)
function mkdirs (p, opts, callback, made) {
if (typeof opts === 'function') {
@@ -13,13 +15,13 @@ function mkdirs (p, opts, callback, made) {
}
if (process.platform === 'win32' && invalidWin32Path(p)) {
var errInval = new Error(p + ' contains invalid WIN32 path characters.')
const errInval = new Error(p + ' contains invalid WIN32 path characters.')
errInval.code = 'EINVAL'
return callback(errInval)
}
var mode = opts.mode
var xfs = opts.fs || fs
let mode = opts.mode
const xfs = opts.fs || fs
if (mode === undefined) {
mode = o777 & (~process.umask())
@@ -29,7 +31,7 @@ function mkdirs (p, opts, callback, made) {
callback = callback || function () {}
p = path.resolve(p)
xfs.mkdir(p, mode, function (er) {
xfs.mkdir(p, mode, er => {
if (!er) {
made = made || p
return callback(null, made)
@@ -37,7 +39,7 @@ function mkdirs (p, opts, callback, made) {
switch (er.code) {
case 'ENOENT':
if (path.dirname(p) === p) return callback(er)
mkdirs(path.dirname(p), opts, function (er, made) {
mkdirs(path.dirname(p), opts, (er, made) => {
if (er) callback(er, made)
else mkdirs(p, opts, callback, made)
})
@@ -47,7 +49,7 @@ function mkdirs (p, opts, callback, made) {
// there already. If so, then hooray! If not, then something
// is borked.
default:
xfs.stat(p, function (er2, stat) {
xfs.stat(p, (er2, stat) => {
// if the stat fails, then that's super weird.
// let the original error be the failure reason.
if (er2 || !stat.isDirectory()) callback(er, made)