aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r--embed/ephy-embed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 994520529..6bfe68b90 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -365,6 +365,7 @@ static const char*
parse_extension (const char *filename)
{
const char *compression;
+ const char *last_separator;
compression = file_is_compressed (filename);
@@ -391,7 +392,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