Refresh window if location is a removable device that has just been plugged in
Use cases
If a window is open to a location on a removable device that isn't plugged in, and the device is plugged in, it would be desirable to automatically refresh the window to show the device contents.
The particular case we are dealing with is Android MTP devices. When these are plugged in, they claim to be an MTP device, but show an empty file listing until they are switched into file transfer mode (for security reasons). When they are switched, they go through an unplug/replug cycle and re-appear as a seemingly identical MTP device, but now with files listed. If you plug in the device, then open (or auto open) a window, and then turn on file transfer mode, the window remains empty until you press F5.
See https://bugzilla.gnome.org/show_bug.cgi?id=744267 for discussion of this from the gvfs perspective
Desired behavior
If a window is open to a removable device location and the device is currently removed but then plugged in, the window should automatically refresh to show contents
Benefits of the solution
- This is the natural expected behaviour in this situation
- It makes the handling of Android devices more seamless
Possible drawbacks
None