Use G_OPTION_ARG_FILENAME for -c option.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 10 Dec 2014 21:55:51 +0000 (22:55 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 10 Dec 2014 21:55:51 +0000 (22:55 +0100)
To use G_OPTION_ARG_FILENAME instead of G_OPTION_ARG_STRING is important
according to the glib documentation.

src/main.c

index 6595e72..54b9ef6 100644 (file)
@@ -1571,7 +1571,7 @@ int main(int argc, char *argv[])
 
     static GOptionEntry opts[] = {
         {"cmd", 'C', 0, G_OPTION_ARG_CALLBACK, autocmdOptionArgFunc, "Ex command run before first page is loaded", NULL},
-        {"config", 'c', 0, G_OPTION_ARG_STRING, &vb.config.file, "Custom configuration file", NULL},
+        {"config", 'c', 0, G_OPTION_ARG_FILENAME, &vb.config.file, "Custom configuration file", NULL},
         {"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window specified by xid", NULL},
         {"kiosk", 'k', 0, G_OPTION_ARG_NONE, &vb.config.kioskmode, "Run in kiosk mode", NULL},
 #ifdef FEATURE_FIFO