···949949 push_current_activity(ACTIVITY_PLUGIN);
950950 /* some plugins assume the entry cache doesn't move and save pointers to it
951951 * they should be fixed properly instead of this lock */
952952- tree_lock_cache(tree_get_context());
952952+ struct tree_context *tc = tree_get_context();
953953+ tree_lock_cache(tc);
954954+ int *last_dirfilter_p = tc->dirfilter; /* store incoming dirfilter pointer */
953955954956 if (!theme_enabled)
955957 FOR_NB_SCREENS(i)
···965967966968 plugin_check_open_close__enter();
967969968968- int rc = p_hdr->entry_point(parameter);
970970+ int rc = p_hdr->entry_point(parameter); /* run the loaded plugin */
969971970970- struct tree_context *tc = tree_get_context();
972972+ /* unlock the tree and restore the dirfilter pointer */
971973 tree_unlock_cache(tc);
972972- tc->dirfilter = &global_settings.dirfilter;
974974+ tc->dirfilter = last_dirfilter_p;
973975974976 pop_current_activity_without_refresh();
975977 if (get_current_activity() != ACTIVITY_WPS)