From 2cbf6ca5f4fcc31773486e7862cf54adf7724305 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sat, 20 Aug 2005 20:34:25 +0000 Subject: [PATCH] when looking for the file extension, only look at the part after the last 2005-08-20 Sven Neumann * 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. --- ChangeLog | 6 ++++++ app/widgets/gimpfiledialog.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6f3c18d2c1..1fdf3ed599 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-20 Sven Neumann + + * 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 * app/base/boundary.[ch]: even more cleanup, replaced informal diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c index bd4eb54ba8..9beeebec43 100644 --- a/app/widgets/gimpfiledialog.c +++ b/app/widgets/gimpfiledialog.c @@ -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. */ -- GitLab