Commit 035975e7 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

Merge branch 'backport-1794-gio-tool-critical-glib-2-66' into 'glib-2-66'

Backport !1794 “gio-tool-info: Prevent criticals if mount options are not available” to glib-2-66

See merge request !1799
parents 22c0e5db 7cc8aec3
Pipeline #238053 failed with stages
in 6 minutes and 57 seconds
......@@ -182,7 +182,8 @@ show_info (GFile *file, GFileInfo *info)
gchar *root_string = NULL;
gchar *mount;
gchar *fs;
gchar *options;
const gchar *options;
gchar *options_string = NULL;
device = g_strescape (g_unix_mount_get_device_path (entry), NULL);
root = g_unix_mount_get_root_path (entry);
......@@ -194,16 +195,22 @@ show_info (GFile *file, GFileInfo *info)
}
mount = g_strescape (g_unix_mount_get_mount_path (entry), NULL);
fs = g_strescape (g_unix_mount_get_fs_type (entry), NULL);
options = g_strescape (g_unix_mount_get_options (entry), NULL);
options = g_unix_mount_get_options (entry);
if (options != NULL)
{
options_string = g_strescape (options, NULL);
}
g_print (_("unix mount: %s%s %s %s %s\n"), device,
root_string ? root_string : "", mount, fs, options);
root_string ? root_string : "", mount, fs,
options_string ? options_string : "");
g_free (device);
g_free (root_string);
g_free (mount);
g_free (fs);
g_free (options);
g_free (options_string);
g_unix_mount_free (entry);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment