[gnome-disk-utility] Fix the handling of the --restore-disk-image option



commit 5d959dc1c877bac67ebaa5d3957233fb1191dfcd
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 25 21:17:18 2015 -0500

    Fix the handling of the --restore-disk-image option
    
    G_OPTION_ARG_FILENAME gets transmitted as a bytearray.
    g_variant_dict_lookup just silently returns NULL if we
    pass the wrong format string, which we were doing,
    unfortunately. The right format string to use for a
    byte array is "^&ay", not "&s".

 src/disks/gduapplication.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/disks/gduapplication.c b/src/disks/gduapplication.c
index e877f30..84deafa 100644
--- a/src/disks/gduapplication.c
+++ b/src/disks/gduapplication.c
@@ -173,7 +173,7 @@ gdu_application_command_line (GApplication            *_app,
   g_variant_dict_lookup (options, "block-device", "&s", &opt_block_device);
   g_variant_dict_lookup (options, "format-device", "b", &opt_format);
   g_variant_dict_lookup (options, "xid", "i", &opt_xid);
-  g_variant_dict_lookup (options, "restore-disk-image", "&s", &opt_restore_disk_image);
+  g_variant_dict_lookup (options, "restore-disk-image", "^&ay", &opt_restore_disk_image);
  
   if (opt_format && opt_block_device == NULL)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]