From: Christian Dywan Date: Sun, 25 Mar 2012 16:03:21 +0000 (+0200) Subject: Allow relative -c/ --config path X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cb1c044816096b6f96e2afa963d81a5f9360b2c;p=midori Allow relative -c/ --config path Fixes: https://bugs.launchpad.net/midori/+bug/962713 --- diff --git a/midori/main.c b/midori/main.c index 65fc2059..05e30aff 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1992,10 +1992,14 @@ main (int argc, return 1; } + /* Relative config path */ if (config && !g_path_is_absolute (config)) { - g_critical (_("The specified configuration folder is invalid.")); - return 1; + gchar* old_config = config; + gchar* current_dir = g_get_current_dir (); + config = g_build_filename (current_dir, old_config, NULL); + g_free (current_dir); + g_free (old_config); } /* Private browsing, window title, default config folder */