filetree: restrict keep_directory setting (c86fd23) to Files menu

Prevents the most recent File Browser directory from
being overwritten when ft_load is called from places other
than the Files menu, such as when browsing the Plugins
menu or the Playlist Catalogue (coming from the main menu,
or from the "Add to Playlist" context menu).

Change-Id: Idbdb2d92c6abcc5cca022d3025b48e0cd4b32f17
This commit is contained in:
Christian Soffke 2026-03-31 22:49:15 +02:00
parent 0e7718ed4e
commit 4b9c78e01b

View file

@ -454,7 +454,7 @@ int ft_load(struct tree_context* c, const char* tempdir)
tree_unlock_cache(c);
if (global_settings.keep_directory)
if (global_settings.keep_directory && get_current_activity() == ACTIVITY_FILEBROWSER)
{
path_append(global_status.browse_last_folder, c->currdir, PA_SEP_HARD,
sizeof(global_status.browse_last_folder));