Skip to content

Commit

Permalink
Quickfix against automount hammering v2
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
niclas authored and david committed Nov 15, 2022
1 parent ba5bec2 commit 94ee29d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions thunar/thunar-shortcuts-model.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,12 +1229,15 @@ thunar_shortcuts_model_add_shortcut_with_path (ThunarShortcutsModel *model,
_thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model));
_thunar_return_if_fail (shortcut->file == NULL || THUNAR_IS_FILE (shortcut->file));

#if 0
/* we want to stay informed about changes to the file */
if (G_LIKELY (shortcut->file != NULL))
{
/* watch the trash for changes */
if (thunar_g_file_is_trash (thunar_file_get_file (shortcut->file)))
thunar_file_watch (shortcut->file);
}
#endif

if (path == NULL)
{
Expand Down Expand Up @@ -1748,6 +1751,7 @@ static void
thunar_shortcut_free (ThunarShortcut *shortcut,
ThunarShortcutsModel *model)
{
#if 0
if (G_LIKELY (shortcut->file != NULL))
{
/* drop the file watch on trash */
Expand All @@ -1756,6 +1760,7 @@ thunar_shortcut_free (ThunarShortcut *shortcut,

g_object_unref (shortcut->file);
}
#endif

if (G_LIKELY (shortcut->device != NULL))
g_object_unref (shortcut->device);
Expand Down

0 comments on commit 94ee29d

Please sign in to comment.