summaryrefslogtreecommitdiff
path: root/gtk2_ardour/startup.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-07-31 13:58:32 +0000
committerCarl Hetherington <carl@carlh.net>2011-07-31 13:58:32 +0000
commit332a4ebb59190eb825a6ee22c1a1349fddd8d98f (patch)
treec2f8cc1494d0d0788848fcd97c29a1c915b3980e /gtk2_ardour/startup.cc
parenteb43f2d0eb78d6ade6b6b08dea1514ca20c029d1 (diff)
Make sure we have a user config directory before trying
to create a .a3 file in it. Fixes #4239. git-svn-id: svn://localhost/ardour2/branches/3.0@9944 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/startup.cc')
-rw-r--r--gtk2_ardour/startup.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc
index c7ee065b32..1722a864c1 100644
--- a/gtk2_ardour/startup.cc
+++ b/gtk2_ardour/startup.cc
@@ -111,6 +111,17 @@ Ardour will play NO role in monitoring"))
setup_alpha_page ();
if (new_user) {
+
+ /* Create the config directory so that we have somewhere to put the
+ been_here_before file.
+ */
+ try {
+ sys::create_directories (user_config_directory ());
+ }
+ catch (const sys::filesystem_error& ex) {
+ error << "Could not create user configuration directory" << endmsg;
+ }
+
/* "touch" the file */
ofstream fout (been_here_before.to_string().c_str());
setup_new_user_page ();