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 david committed May 8, 2019
1 parent 8de0769 commit 8b61b41
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 @@ -2071,6 +2071,7 @@ thunar_window_bookmark_release_file (gpointer data)
{
ThunarFile *file = THUNAR_FILE (data);

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

Expand All @@ -2080,6 +2081,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 @@ -2143,13 +2145,15 @@ G_GNUC_END_IGNORE_DEPRECATIONS
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 8b61b41

Please sign in to comment.