From 8a813fdd9d1243557de94043116fa93c6e019cdd Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Tue, 2 Sep 2008 08:15:44 +0000 Subject: [PATCH] Fix FS#9352 - allow .talk clips for single-character filenames. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18383 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/tree.c b/apps/tree.c index 98cb88ffb1..3e469247c8 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -224,7 +224,6 @@ static int tree_voice_cb(int selected_item, void * data) { if(global_settings.talk_dir_clip) { - DEBUGF("Playing directory thumbnail: %s", local_tc->currdir); did_clip = true; if(ft_play_dirname(name) <0) /* failed, not existing */ @@ -234,8 +233,6 @@ static int tree_voice_cb(int selected_item, void * data) if (global_settings.talk_file_clip && (attr & FILE_ATTR_THUMBNAIL)) { did_clip = true; - DEBUGF("Playing file thumbnail: %s/%s%s\n", - local_tc->currdir, name, file_thumbnail_ext); ft_play_filename(local_tc->currdir, name); } } @@ -1071,7 +1068,7 @@ static void ft_play_filename(char *dir, char *file) return; #endif - if (strlen(file) > strlen(file_thumbnail_ext) + if (strlen(file) >= strlen(file_thumbnail_ext) && strcasecmp(&file[strlen(file) - strlen(file_thumbnail_ext)], file_thumbnail_ext)) /* file has no .talk extension */