when looking for the file extension, only look at the part after the last

2005-08-20  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpfiledialog.c (gimp_file_dialog_proc_changed):
	when looking for the file extension, only look at the part after
	the last directory separator.
This commit is contained in:
Sven Neumann 2005-08-20 20:34:25 +00:00 committed by Sven Neumann
parent eb69eb49dc
commit 2cbf6ca5f4
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-08-20 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfiledialog.c (gimp_file_dialog_proc_changed):
when looking for the file extension, only look at the part after
the last directory separator.
2005-08-20 Michael Natterer <mitch@gimp.org>
* app/base/boundary.[ch]: even more cleanup, replaced informal

View File

@ -711,6 +711,10 @@ gimp_file_dialog_proc_changed (GimpFileProcView *view,
{
const gchar *last_dot = strrchr (uri, '.');
/* if the dot is before the last slash, ignore it */
if (last_dot && strrchr (uri, '/') > last_dot)
last_dot = NULL;
/* check if the uri has a "meta extension" (e.g. foo.bar.gz)
* and try to truncate both extensions away.
*/