Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Deleting a folder from disk while VuIO is running did not remove it from DLNA/TV listings. The folder and its files stayed in the index, and no ContentDirectory revision was published.
Root cause
On macOS, FSEvents emits
Remove(Folder)plusModify(Metadata(Extended))for a deleted directory.notify-debouncer-full0.7 can discard theRemovewhen a delayedCreatefor the same path is still in its queue:push_remove_eventdrops the whole queue whenwas_created()is true. The only event left for the app is thenModify(Metadata).convert_watcher_eventsonly handledModifyasModified. A deleted directory failspath_is_relevant(it is no longer a dir and has no media extension), so the last event was dropped. NoDeletedmeans no index cleanup, no revision bump, and no UPnPNOTIFY— so the TV kept listing the folder.Since #58 removed the five-minute deleted-file probe and defaults
full_rescan_interval_hoursto0, nothing else reconciled the index while the server was running.A live index reproduced the end state:
media.dbstill contained a deleted folder and two files from~/Downloads, while none existed on disk.Fix
Any
Modify(Data|Metadata|Any|Other)event for a path that no longer exists (try_exists() == Ok(false)) and belongs to a configured library is now converted toFileSystemEvent::Deleted. I/O and permission errors (Err) are still not treated as deletions. This also fixes deleted media files that were being misclassified as modifications.Tests
Modify(Metadata)batch become deletions, while an existing file staysModified.cargo test -p vuio-core --no-default-features --lib watcher::tests— 11 passedcargo test -p vuio-core --no-default-features --lib lifecycle::media_service— 20 passed