Skip to content

Commit

Permalink
Quickfix against automount hammering
Browse files Browse the repository at this point in the history
do not monitor shortcuts. if shortcuts are set thunar will remount
automount pathes everytime they get expired by autmount -> so they
will never really expire even if totally unused all automount pathes
in bookmarks are always mounted.

this fix lets automount decide when a path is not needed.
  • Loading branch information
mariux authored and donald committed May 17, 2018
1 parent 7117739 commit 8ca2ec9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions thunar/thunar-shortcuts-model.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ thunar_shortcuts_model_add_shortcut_with_path (ThunarShortcutsModel *model,
_thunar_return_if_fail (shortcut->file == NULL || THUNAR_IS_FILE (shortcut->file));

/* we want to stay informed about changes to the file */
#if 0
if (G_LIKELY (shortcut->file != NULL))
{
/* watch the file for changes */
Expand All @@ -1142,6 +1143,7 @@ thunar_shortcuts_model_add_shortcut_with_path (ThunarShortcutsModel *model,
g_signal_connect (G_OBJECT (shortcut->file), "destroy",
G_CALLBACK (thunar_shortcuts_model_file_destroy), model);
}
#endif

if (path == NULL)
{
Expand Down Expand Up @@ -1655,6 +1657,7 @@ static void
thunar_shortcut_free (ThunarShortcut *shortcut,
ThunarShortcutsModel *model)
{
#if 0
if (G_LIKELY (shortcut->file != NULL))
{
/* drop the file watch */
Expand All @@ -1666,6 +1669,7 @@ thunar_shortcut_free (ThunarShortcut *shortcut,
0, NULL, NULL, model);
g_object_unref (shortcut->file);
}
#endif

if (G_LIKELY (shortcut->device != NULL))
g_object_unref (shortcut->device);
Expand Down
4 changes: 4 additions & 0 deletions thunar/thunar-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,6 +2001,7 @@ thunar_window_bookmark_release_file (gpointer data)
{
ThunarFile *file = THUNAR_FILE (data);

#if 0
/* stop watching */
thunar_file_unwatch (file);

Expand All @@ -2010,6 +2011,7 @@ thunar_window_bookmark_release_file (gpointer data)
0, NULL,
G_CALLBACK (thunar_window_bookmark_changed),
NULL);
#endif

g_object_unref (file);
}
Expand Down Expand Up @@ -2071,13 +2073,15 @@ thunar_window_bookmark_merge_line (GFile *file_path,
g_object_set_data_full (G_OBJECT (action), I_("thunar-file"), file,
thunar_window_bookmark_release_file);

#if 0
/* watch the file */
thunar_file_watch (file);

g_signal_connect_swapped (G_OBJECT (file), "destroy",
G_CALLBACK (thunar_window_bookmark_changed), window);
g_signal_connect_swapped (G_OBJECT (file), "changed",
G_CALLBACK (thunar_window_bookmark_changed), window);
#endif
}
else
{
Expand Down

0 comments on commit 8ca2ec9

Please sign in to comment.