Fix:Server crash when deleting library item #2031

This commit is contained in:
advplyr 2023-08-26 16:33:27 -05:00
parent a3899b68e1
commit a38e43213d
8 changed files with 437 additions and 20 deletions

View file

@ -92,6 +92,12 @@ function bytesPretty(bytes, decimals = 0) {
}
module.exports.bytesPretty = bytesPretty
/**
* Get array of files inside dir
* @param {string} path
* @param {string} [relPathToReplace]
* @returns {{name:string, path:string, dirpath:string, reldirpath:string, fullpath:string, extension:string, deep:number}[]}
*/
async function recurseFiles(path, relPathToReplace = null) {
path = filePathToPOSIX(path)
if (!path.endsWith('/')) path = path + '/'