[PR #2465] [MERGED] Add try/catch to fileUtils.getFileMtimeMs #3721

Closed
opened 2026-04-25 00:16:47 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2465
Author: @thevoltagesource
Created: 12/29/2023
Status: Merged
Merged: 12/31/2023
Merged by: @advplyr

Base: masterHead: getFileMtimeMs_Unhandled_Exception


📝 Commits (1)

  • e4effeb Add try/catch to fileutils.getFileMtimeMs

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 server/utils/fileUtils.js (+6 -1)

📄 Description

Added a try/catch to the fileUtils.js getFileMtimeMs function. This addresses the exception thrown when an ephemeral file is added to a library and flagged by Watcher to be scanned. I tested this against 2.6.0 and 2.7.0 and it resolves my situation mentioned in https://github.com/advplyr/audiobookshelf/issues/2332 and it should resolve the reported issue completely.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2465 **Author:** [@thevoltagesource](https://github.com/thevoltagesource) **Created:** 12/29/2023 **Status:** ✅ Merged **Merged:** 12/31/2023 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `getFileMtimeMs_Unhandled_Exception` --- ### 📝 Commits (1) - [`e4effeb`](https://github.com/advplyr/audiobookshelf/commit/e4effebc196226c1d4580964bbb3077bcaaab07a) Add try/catch to fileutils.getFileMtimeMs ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/fileUtils.js` (+6 -1) </details> ### 📄 Description Added a try/catch to the fileUtils.js getFileMtimeMs function. This addresses the exception thrown when an ephemeral file is added to a library and flagged by Watcher to be scanned. I tested this against 2.6.0 and 2.7.0 and it resolves my situation mentioned in https://github.com/advplyr/audiobookshelf/issues/2332 and it should resolve the reported issue completely. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:47 +02:00
adam closed this issue 2026-04-25 00:16:47 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3721