diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index fbe7f864..100a4d3e 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -1005,7 +1005,7 @@ thunar_file_info_reload (ThunarFile *file, _thunar_assert (file->basename != NULL); /* problematic files with content type reading */ - if (strcmp (file->basename, "kmsg") == 0 + if (g_strcmp0 (file->basename, "kmsg") == 0 && g_file_is_native (file->gfile)) { path = g_file_get_path (file->gfile); diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index 0544593e..b6bf589e 100644 --- a/thunar/thunar-gio-extensions.c +++ b/thunar/thunar-gio-extensions.c @@ -327,7 +327,7 @@ thunar_g_file_get_display_name_remote (GFile *mount_point) scheme = g_file_get_uri_scheme (mount_point); parse_name = g_file_get_parse_name (mount_point); - if (g_str_has_prefix (parse_name, scheme)) + if (scheme != NULL && g_str_has_prefix (parse_name, scheme)) { /* extract the hostname */ p = parse_name + strlen (scheme); @@ -372,7 +372,8 @@ thunar_g_file_get_display_name_remote (GFile *mount_point) g_free (hostname); } - g_free (scheme); + if (scheme != NULL) + g_free (scheme); g_free (parse_name); }