[Xfce4-commits] <midori:master> Allow relative -c/ --config path
Christian Dywan
noreply at xfce.org
Sun Mar 25 18:12:03 CEST 2012
Updating branch refs/heads/master
to 5cb1c044816096b6f96e2afa963d81a5f9360b2c (commit)
from 7789bafc68c91c265cbc40f0561a510a7c6cd6de (commit)
commit 5cb1c044816096b6f96e2afa963d81a5f9360b2c
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Mar 25 18:03:21 2012 +0200
Allow relative -c/ --config path
Fixes: https://bugs.launchpad.net/midori/+bug/962713
midori/main.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/midori/main.c b/midori/main.c
index 65fc205..05e30af 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 */
More information about the Xfce4-commits
mailing list