diff options
-rw-r--r-- | embed/ephy-embed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 8f2c4738b..3f9084fbd 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -496,6 +496,7 @@ static const char* parse_extension (const char *filename) { const char *compression; + const char *last_separator; compression = file_is_compressed (filename); @@ -522,7 +523,8 @@ parse_extension (const char *filename) } /* no compression, just look for the last dot in the filename */ - return g_strrstr (filename, "."); + last_separator = strrchr (filename, G_DIR_SEPARATOR); + return strrchr ((last_separator) ? last_separator : filename, '.'); } static gboolean |