diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-08-08 10:02:00 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-08-08 10:02:00 +0000 |
| commit | ecae04a9f27f6694e748bbde5d49fbd47a01fec3 (patch) | |
| tree | f9be9ada53512c6fcb2c9652805d6e69f126560d | |
| parent | 92abed78cc010a077738b576ffdc36fd29a3c859 (diff) | |
| download | rockbox-ecae04a9f27f6694e748bbde5d49fbd47a01fec3.zip rockbox-ecae04a9f27f6694e748bbde5d49fbd47a01fec3.tar.gz rockbox-ecae04a9f27f6694e748bbde5d49fbd47a01fec3.tar.bz2 rockbox-ecae04a9f27f6694e748bbde5d49fbd47a01fec3.tar.xz | |
Fix the open with menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14241 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/filetypes.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 530dab1..76cd726 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -448,7 +448,8 @@ int filetype_list_viewers(const char* current_file) int j; for (j=0;j<count;j++) /* check if the plugin is in the list yet */ { - if (items[j] == i) + if (filetypes[i].plugin && + !strcmp(filetypes[i].plugin,filetypes[items[j]].plugin)) break; } if (j<count) @@ -479,9 +480,11 @@ int filetype_list_viewers(const char* current_file) continue; else if (action == ACTION_STD_OK) { - i = gui_synclist_get_sel_pos(&lists); - return filetype_load_plugin(filetypes[i].plugin, - (void*)current_file); + char plugin[MAX_PATH]; + i = items[gui_synclist_get_sel_pos(&lists)]; + snprintf(plugin, MAX_PATH, "%s/%s.%s", + PLUGIN_DIR, filetypes[i].plugin, ROCK_EXTENSION); + return plugin_load(plugin, (char*)current_file); } else if (action == ACTION_STD_CANCEL) return action; |