You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Library watcher reopens a library closed right after creation #3158
Follow-up to #3145. LibraryManager's directory watcher debounces a new .sdlibrary folder for 500 ms and skips it only while the path is in creating. CreationGuard::drop removes the path as soon as creation finishes, while the folder's own create event is still pending. If the creator calls close_library inside the debounce window, the watcher opens the library again; the reopened copy holds .sdlibrary.lock and the next open fails with AlreadyInUse.
Since migrations run in one transaction (#3147), creation is fast enough to hit this window in normal runs. #3145 fixed the shutdown variant; this is the explicit-close variant.
Steps to reproduce
Create a library through LibraryManager.
Close it immediately.
Wait past the 500 ms debounce.
The library is open again, and reopening it fails with AlreadyInUse.
Platform and versions
OS: Arch Linux (kernel 7.2)
Spacedrive: main at 4d41a379f, built from source
Development tool versions
bun 1.4.3
cargo 1.97.1 (c980f4866 2026-06-30)
rustc 1.97.1 (8bab26f4f 2026-07-14)
Activity