From 5cb1c044816096b6f96e2afa963d81a5f9360b2c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 25 Mar 2012 18:03:21 +0200 Subject: [PATCH] Allow relative -c/ --config path Fixes: https://bugs.launchpad.net/midori/+bug/962713 --- midori/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 */ -- 2.39.5