From 9310b51841f75cd7b377f896880692eefaf26492 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 15 Jan 2025 12:24:55 -0500 Subject: [PATCH] [Bugfix] OpenPlugin on multivolume targets to check for against /.rockbox/viewers (VIEWERS_DIR) on multivolume you need to strip all the prefix junk of volume and potentially strip the redirect directory Change-Id: I8e24c43d84c3b90ffb4bbf62d4287620a5890ade --- apps/open_plugin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/open_plugin.c b/apps/open_plugin.c index 0ec881c1db..b09fa6a1a4 100644 --- a/apps/open_plugin.c +++ b/apps/open_plugin.c @@ -413,9 +413,15 @@ void open_plugin_browse(const char *key) if (rockbox_browse(&browse) == GO_TO_PREVIOUS) { open_plugin_add_path(key, tmp_buf, NULL); + const char *path = tmp_buf; +#ifdef HAVE_MULTIVOLUME + path = strstr(path, ROCKBOX_DIR); + if (!path) + path = tmp_buf; +#endif /* if this is a viewer ask the user if they want to set a parameter */ if (op_entry->lang_id > 0 - && strncmp(tmp_buf, VIEWERS_DIR, sizeof(VIEWERS_DIR) -1) == 0) + && strncmp(path, VIEWERS_DIR, sizeof(VIEWERS_DIR) -1) == 0) { if (yesno_pop(ID2P(LANG_PARAMETER))) {