FS#13746: open_plugin_run() doesn't handle "not found" properly

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit d76c9c992cbb2c3487af19fd482d36db90b0b496
Author: Solomon Peachy <[email protected]>
Date:   Wed Mar 4 14:06:07 2026 -0500

    FS#13746:  open_plugin_run() doesn't handle "not found" properly
    
    If the specified key wasn't found, we would fall back to trying to launch
    a plugin with the LANG_* key.  This will fail, resulting in an error
    that spells out the (inappropriate) LANG_* text.
    
    Instead, fail out with a more appropriate error.
    
    Change-Id: I046878f87a2ef2bc994d0b7d037359695a18d392

diff --git a/apps/open_plugin.c b/apps/open_plugin.c
index bcb8b34604..c892a94233 100644
--- a/apps/open_plugin.c
+++ b/apps/open_plugin.c
@@ -479,6 +479,10 @@ int open_plugin_run(const char *key)
 {
     int ret = 0;
     int opret = open_plugin_load_entry(key);
+    if (opret == OPEN_PLUGIN_NOT_FOUND) {
+        splashf(HZ*2, ID2P(LANG_PLUGIN_CANT_OPEN), key ? P2STR((unsigned char *)key) : "");
+        return ret;
+    }
     struct open_plugin_entry_t *op_entry = open_plugin_get_entry();
     if (opret == OPEN_PLUGIN_NEEDS_FLUSHED)
         op_update_dat(op_entry, false);
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.