mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-09-01 08:15:15 +02:00
Add:Check metadata.abs file modified date to rescan
This commit is contained in:
parent
42604331ff
commit
74a68a4557
4 changed files with 20 additions and 8 deletions
|
@ -50,7 +50,7 @@ const chmodr = (p, mode, uid, gid, cb) => {
|
|||
// any error other than ENOTDIR means it's not readable, or
|
||||
// doesn't exist. give up.
|
||||
if (er && er.code !== 'ENOTDIR') return cb(er)
|
||||
if (er) {
|
||||
if (er) { // Is a file
|
||||
return fs.chmod(p, mode).then(() => {
|
||||
fs.chown(p, uid, gid, cb)
|
||||
})
|
||||
|
@ -77,9 +77,9 @@ const chmodr = (p, mode, uid, gid, cb) => {
|
|||
})
|
||||
}
|
||||
|
||||
module.exports = (path, mode, uid, gid) => {
|
||||
module.exports = (path, mode, uid, gid, silent = false) => {
|
||||
return new Promise((resolve) => {
|
||||
Logger.debug(`[FilePerms] Setting permission "${mode}" for uid ${uid} and gid ${gid} | "${path}"`)
|
||||
if (!silent) Logger.debug(`[FilePerms] Setting permission "${mode}" for uid ${uid} and gid ${gid} | "${path}"`)
|
||||
chmodr(path, mode, uid, gid, resolve)
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue