|
Fix https://github.com/mate-desktop/caja/issues/1066 "Caja caches folders from usb drives/disk"
Nowadays, we rely on G_FILE_MONITOR_EVENT_UNMOUNTED to be emitted when a
mount disappears, since we already monitor the directory, in order to
switch the view to a different location.
Since non-native mounts very likely won't have file monitoring though,
we're not going to receive such events in that case, and fail to
redirect the view as a consequence.
This patch fixes it by listening to the mount-removed signal on
GVolumeMonitor when a monitor is requested for a non-native mount, and
emulating a file removal in that case.
Backport Nautilus commit gitlab.gnome.org/GNOME/nautilus/commit/3891241ba760c59d284b7579dbd340651c8d4d29
note that caja_get_mounted_mount_for_root had to be added, while the equivalent Nautilus function was from a prior commit
|