File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,6 @@ mount_removed_callback (GVolumeMonitor *monitor,
286286
287287 root = g_mount_get_root (mount );
288288 uri = g_file_get_uri (root );
289- g_object_unref (root );
290289
291290 DEBUG ("Removed mount at uri %s" , uri );
292291 g_free (uri );
@@ -297,6 +296,14 @@ mount_removed_callback (GVolumeMonitor *monitor,
297296 if (window != NULL ) {
298297 GList * l ;
299298 GList * lp ;
299+ GFile * saved_location ;
300+
301+ /* Clear the stored secondary pane location if it was on the removed mount */
302+ saved_location = window -> details -> secondary_pane_last_location ;
303+ if (saved_location != NULL &&
304+ (g_file_has_prefix (saved_location , root ) || g_file_equal (saved_location , root ))) {
305+ nemo_window_clear_secondary_pane_location (window );
306+ }
300307
301308 for (lp = window -> details -> panes ; lp != NULL ; lp = lp -> next ) {
302309 NemoWindowPane * pane ;
@@ -312,6 +319,8 @@ mount_removed_callback (GVolumeMonitor *monitor,
312319 }
313320 }
314321
322+ g_object_unref (root );
323+
315324 /* Handle the windows in the close list. */
316325 for (node = close_list ; node != NULL ; node = node -> next ) {
317326 slot = node -> data ;
You can’t perform that action at this time.
0 commit comments