From 5a8f6bae9489b6832102874b55b2ea6bc1ac3743 Mon Sep 17 00:00:00 2001 From: Henrik Backe Date: Sun, 9 Oct 2005 13:37:35 +0000 Subject: Fixed broken "open with" in onplay menu. A problem with duplicate entries still exists in "open with" which I think is best solved by removing the scan_plugins() function in filetypes.c, but I don't want to remove it without a discussing it first. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7603 a1c6a512-1295-4272-9138-f99709370657 --- apps/filetypes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/filetypes.c b/apps/filetypes.c index 9235e22..5d1c556 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -238,13 +238,17 @@ int filetype_get_attr(const char* name) int filetype_load_menu(struct menu_item* menu,int max_items) { int i; + char *cp; int cnt=0; for (i=0; i < cnt_filetypes; i++) { if (filetypes[i].plugin) { - menu[cnt].desc = filetypes[i].plugin; + cp=strrchr(filetypes[i].plugin,'/'); + if (cp) cp++; + else cp=filetypes[i].plugin; + menu[cnt].desc = cp; cnt++; if (cnt == max_items) break; -- cgit v1.1