The actual problem of the ghost files is triggered because the used FileMonitor is destroyed and re-created on each "thunar_folder_reload". Because of that, some notifications of the FileMonitor are lost, leading to missing folder reloads.
Since sooner or later we need to exchange this flag, I just did so (See patch) to my suprise fixing the deprecated enum item as well fixed this bug.
However I dont fully understand the new functionallity yet, since it looks like only "G_FILE_MONITOR_EVENT_MOVED_OUT" is triggered, the other are not, while it looks like there are no regressions.
On top I still need to figure out if it makes sense at all to destroy and re-create the FileMonitor.
Created attachment 8693
a better patch
The actual problem of the ghost files is triggered because the used FileMonitor is destroyed and re-created on each "thunar_ folder_ reload" . Because of that, some notifications of the FileMonitor are lost, leading to missing folder reloads.
While trying to figure out why one would want to destroy the FileMonitor on each folder_reload, I found that we currently use a deprecated FileMonitor flag "G_FILE_ MONITOR_ SEND_MOVED" . /developer. gnome.org/ gio/stable/ GFile.html# G-FILE- MONITOR- SEND-MOVED: CAPS
See details here: https:/
Since sooner or later we need to exchange this flag, I just did so (See patch) to my suprise fixing the deprecated enum item as well fixed this bug.
However I dont fully understand the new functionallity yet, since it looks like only "G_FILE_ MONITOR_ EVENT_MOVED_ OUT" is triggered, the other are not, while it looks like there are no regressions.
On top I still need to figure out if it makes sense at all to destroy and re-create the FileMonitor.