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.zip rockbox-b2473d58ab1a7ff0722bd27f08ce5a8856cd5502.tar.gz rockbox-b2473d58ab1a7ff0722bd27f08ce5a8856cd5502.tar.bz2 rockbox-b2473d58ab1a7ff0722bd27f08ce5a8856cd5502.tar.xz | |
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 ace8915..30ab2c3 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -209,17 +209,18 @@ bool filetype_supported(int attr) } /* get the "dynamic" attribute for an extension */ -int filetype_get_attr(const char* name) +int filetype_get_attr(char* name) { int i; + char *cp; for (i=0; i < cnt_exttypes; i++) { if (exttypes[i].extension) { - if (!strcasecmp(&name[strlen(name)- - strlen(exttypes[i].extension)], - exttypes[i].extension)) + cp=strrchr(name,'.'); + if (cp) cp++; + if ((!strcasecmp(cp,exttypes[i].extension)) && (cp)) { return ((((unsigned long)exttypes[i].type - (unsigned long)&filetypes[0]) / |