audiobookshelf
audiobookshelf copied to clipboard
[Bug]: maybe skip special files (Mac OS X)?
What happened?
Audiobookshelf is listing sepcial files/directories of Mac OS X as inaccessible (which ist technically correct, I'm just not sure why it's attempting to access them in the first place).
What did you expect to happen?
not that... :) I'd expect to skip those and not log them as inaccessible.
Steps to reproduce the issue
- use an external storage device on Mac OS X
- bind root directory of the storage device to Docker container
- Run Audioshelf adds set up a library
- scan the library
Audiobookshelf version
2.11.0
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
macOS
If the issue is being seen in the UI, what browsers are you seeing the problem on?
None
Logs
2024-08-04 16:28:12.302
ERROR
[fileUtils] Recurse files file "/audiobooks/.Spotlight-V100" has error Error: ENOENT: no such file or directory, stat '/audiobooks/.Spotlight-V100'
2024-08-04 16:28:12.302
ERROR
[fileUtils] Recurse files file "/audiobooks/.TemporaryItems" has error Error: ENOENT: no such file or directory, stat '/audiobooks/.TemporaryItems'
2024-08-04 16:28:12.303
ERROR
[fileUtils] Recurse files file "/audiobooks/.Trashes" has error Error: ENOENT: no such file or directory, stat '/audiobooks/.Trashes'
Additional Notes
this is nitpicking - it doesn't cause any other issues and I'd fully understand if this bug report would just be closed, especially since it's an edge case.
Related to https://github.com/advplyr/audiobookshelf/issues/1641
Dot files are already ignored but there is a bug.
For future reference when fixing this issue: https://github.com/advplyr/audiobookshelf/blob/0099ae633af74b9dec00eb45fedf21cd4a96dad3/server/Watcher.js#L192-L198
the waitForFileToAdd function should not run if the addFileUpdate function returns early
Fixed in v2.17.6.