diff --git a/app/file/file-utils.c b/app/file/file-utils.c index 32feca5d0f..8823cf8093 100644 --- a/app/file/file-utils.c +++ b/app/file/file-utils.c @@ -220,11 +220,11 @@ file_utils_file_get_ext (GFile *file) uri = g_file_get_uri (file); uri_len = strlen (uri); - if (g_strrstr (uri, ".gz")) + if (g_str_has_suffix (uri, ".gz")) search_len = uri_len - 3; - else if (g_strrstr (uri, ".bz2")) + else if (g_str_has_suffix (uri, ".bz2")) search_len = uri_len - 4; - else if (g_strrstr (uri, ".xz")) + else if (g_str_has_suffix (uri, ".xz")) search_len = uri_len - 3; else search_len = uri_len;