mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 09:14:40 +02:00
Merge branch 'master' of https://github.com/advplyr/audiobookshelf
This commit is contained in:
commit
e8ea7efc98
1 changed files with 6 additions and 1 deletions
|
@ -81,7 +81,12 @@ module.exports.getFileSize = async (path) => {
|
|||
* @returns {Promise<number>} epoch timestamp
|
||||
*/
|
||||
module.exports.getFileMTimeMs = async (path) => {
|
||||
return (await getFileStat(path))?.mtimeMs || 0
|
||||
try {
|
||||
return (await getFileStat(path))?.mtimeMs || 0
|
||||
} catch (err) {
|
||||
Logger.error(`[fileUtils] Failed to getFileMtimeMs`, err)
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue