only create user configuration directory if no explicit version was given
This commit is contained in:
parent
c9d10158f6
commit
d563b1173b
@ -98,6 +98,10 @@ user_config_directory (int version)
|
|||||||
|
|
||||||
p = Glib::build_filename (p, user_config_directory_name (version));
|
p = Glib::build_filename (p, user_config_directory_name (version));
|
||||||
|
|
||||||
|
if (version < 0) {
|
||||||
|
/* Only create the user config dir if the version was negative,
|
||||||
|
meaning "for the current version.
|
||||||
|
*/
|
||||||
if (!Glib::file_test (p, Glib::FILE_TEST_EXISTS)) {
|
if (!Glib::file_test (p, Glib::FILE_TEST_EXISTS)) {
|
||||||
if (g_mkdir_with_parents (p.c_str(), 0755)) {
|
if (g_mkdir_with_parents (p.c_str(), 0755)) {
|
||||||
error << string_compose (_("Cannot create Configuration directory %1 - cannot run"),
|
error << string_compose (_("Cannot create Configuration directory %1 - cannot run"),
|
||||||
@ -109,6 +113,7 @@ user_config_directory (int version)
|
|||||||
p) << endmsg;
|
p) << endmsg;
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user