BUG: sync-folder 500 on missing folder
Is there an existing issue for this?
- [x] I have searched the existing issues
What happened?
Description
if a folder was deleted, moved, or an external drive was unplugged from the machine, calling POST /folders/sync-folder triggers os.listdir() in utils/folders.py which raises Python's FileNotFoundError
Screenshots
"error" : "Filesystem error"
How to Replicate
use POST /folders/sync-folder and add a non existent path and dummy id
and the error is replicated!
Note
i would like to contribute, assign me
Record
- [x] I agree to follow this project's Code of Conduct
👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
⚠️ Potential Duplicate Issue (Semantic Match)
This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:
-
BUG: Folders registered at a drive root (D:, mapped network drive) never sync - file changes are silently dropped (#1541, open) https://github.com/AOSSIE-Org/PictoPy/issues/1541 Similarity: 61.4%
-
BUG: Sync-service: Deadlock when Watcher Self-Restarts after Folder Deletion (#1031, open) https://github.com/AOSSIE-Org/PictoPy/issues/1031 Similarity: 58.8%
Please review before proceeding.