Browse files

File dialog: properly get file extension

  • Loading branch information...
1 parent 65e17b5 commit 21c418b754bc025d735906970fb1b5945cb96d2d @sbourdeauducq sbourdeauducq committed Apr 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/filedialog.c
View
2 src/filedialog.c
@@ -70,7 +70,7 @@ static void display_folder(struct filedialog *dlg, const char *folder)
}
} else {
/* hide files without the extension we are looking for */
- c = strchr(entry->d_name, '.');
+ c = strrchr(entry->d_name, '.');
if((dlg->extfilter[0] == 0) || ((c != NULL) && (strcmp(dlg->extfilter, c+1) == 0))) {
if(n_files < 384) {
files[n_files] = strdup(entry->d_name);

0 comments on commit 21c418b

Please sign in to comment.