Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

File dialog: properly get file extension

  • Loading branch information...
commit 21c418b754bc025d735906970fb1b5945cb96d2d 1 parent 65e17b5
Sébastien Bourdeauducq authored April 12, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  src/filedialog.c
2  src/filedialog.c
@@ -70,7 +70,7 @@ static void display_folder(struct filedialog *dlg, const char *folder)
70 70
 			}
71 71
 		} else {
72 72
 			/* hide files without the extension we are looking for */
73  
-			c = strchr(entry->d_name, '.');
  73
+			c = strrchr(entry->d_name, '.');
74 74
 			if((dlg->extfilter[0] == 0) || ((c != NULL) && (strcmp(dlg->extfilter, c+1) == 0))) {
75 75
 				if(n_files < 384) {
76 76
 					files[n_files] = strdup(entry->d_name);

0 notes on commit 21c418b

Please sign in to comment.
Something went wrong with that request. Please try again.