Allow relative -c/ --config path
Fixes: https://bugs.launchpad.net/midori/+bug/962713
This commit is contained in:
parent
7789bafc68
commit
5cb1c04481
1 changed files with 6 additions and 2 deletions
|
@ -1992,10 +1992,14 @@ main (int argc,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Relative config path */
|
||||||
if (config && !g_path_is_absolute (config))
|
if (config && !g_path_is_absolute (config))
|
||||||
{
|
{
|
||||||
g_critical (_("The specified configuration folder is invalid."));
|
gchar* old_config = config;
|
||||||
return 1;
|
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 */
|
/* Private browsing, window title, default config folder */
|
||||||
|
|
Loading…
Reference in a new issue