Update view after permanent delete of folder containing files#2624
Merged
Update view after permanent delete of folder containing files#2624
Conversation
2 tasks
leonardo-lemos
approved these changes
Oct 5, 2025
Member
|
Permanently deleting multiple of files/directories at once often doesn't refresh the view 2025-10-05.21-41-48.mp4 |
Contributor
Author
I cannot reproduce this with test folders. You imply that the issue is not very reproducible - any idea under what conditions it happens? I am inclined to wait for an issue report with steps to reproduce before looking into this further. |
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.
Fixes #2623
This issue is rooted in the way the C library handles permanent deletions (which differs from trashing) which makes the handling of file removal notifications in Directory.vala fail as it is based on the (in this case incorrect) assumption that each batch of removed files have the same parent. The C library was sending the same signal for the directory as for its children.
Rather than make substantial changes to the spaghetti that is the C library, I have introduced a separate category of file change for deletion of a folder (only used in the case of permanent deletion). This makes the Directory handle that change separately, which fixes the issue.
This is a long outstanding issue (it occurs at least as far back as v6.4 and probably well before that since the C library is rarely touched).
Since the new function is only called in one place during permanent deletion of a folder, and
Directory.valais not touched, these changes should not impact any other file operation.