diff options
author | Henrik Backe <henrik@backe.eu> | 2005-09-02 15:05:35 +0000 |
---|---|---|
committer | Henrik Backe <henrik@backe.eu> | 2005-09-02 15:05:35 +0000 |
commit | b2473d58ab1a7ff0722bd27f08ce5a8856cd5502 (patch) | |
tree | 3eca1349052d07ddf975956bdd2ab8f4bce6e309 /apps/filetypes.c | |
parent | acf14e05693125d3768de80d99d7cfff6c2b164a (diff) | |
download | rockbox-b2473d58ab1a7ff0722bd27f08ce5a8856cd5502.tar.gz rockbox-b2473d58ab1a7ff0722bd27f08ce5a8856cd5502.zip |
Fixed associate problem with file extensions (.info files matched .nfo extension)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7456 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/filetypes.c')
-rw-r--r-- | apps/filetypes.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index ace89154fc..30ab2c34e5 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -209,17 +209,18 @@ bool filetype_supported(int attr) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | /* get the "dynamic" attribute for an extension */ | 211 | /* get the "dynamic" attribute for an extension */ |
212 | int filetype_get_attr(const char* name) | 212 | int filetype_get_attr(char* name) |
213 | { | 213 | { |
214 | int i; | 214 | int i; |
215 | char *cp; | ||
215 | 216 | ||
216 | for (i=0; i < cnt_exttypes; i++) | 217 | for (i=0; i < cnt_exttypes; i++) |
217 | { | 218 | { |
218 | if (exttypes[i].extension) | 219 | if (exttypes[i].extension) |
219 | { | 220 | { |
220 | if (!strcasecmp(&name[strlen(name)- | 221 | cp=strrchr(name,'.'); |
221 | strlen(exttypes[i].extension)], | 222 | if (cp) cp++; |
222 | exttypes[i].extension)) | 223 | if ((!strcasecmp(cp,exttypes[i].extension)) && (cp)) |
223 | { | 224 | { |
224 | return ((((unsigned long)exttypes[i].type - | 225 | return ((((unsigned long)exttypes[i].type - |
225 | (unsigned long)&filetypes[0]) / | 226 | (unsigned long)&filetypes[0]) / |