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 committed Feb 24, 2021
1 parent 151c6da commit 5a8964c
Showing 1 changed file with 4 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 @@ -1216,6 +1216,7 @@ 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))
{
Expand All @@ -1228,6 +1229,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 @@ -1741,6 +1743,7 @@ static void
thunar_shortcut_free (ThunarShortcut *shortcut,
ThunarShortcutsModel *model)
{
#if 0
if (G_LIKELY (shortcut->file != NULL))
{
/* drop the file watch */
Expand All @@ -1752,6 +1755,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

1 comment on commit 5a8964c

@donald
Copy link
Contributor

@donald donald commented on 5a8964c Feb 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this was a public project, you'd need to keep the original authorship of 8ca2ec9. No problem here, though, I don't expect Marius to care.

But now you take the blame for the ugly commit message. You did right with 151c6da, so that rightfully I take the blame for the even uglier commit message of that one. :-)

Please sign in to comment.