Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Dec 31, 2023
2 parents 81a7659 + 5336864 commit e8ea7ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/utils/fileUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

/**
Expand Down

0 comments on commit e8ea7ef

Please sign in to comment.