From 332a4ebb59190eb825a6ee22c1a1349fddd8d98f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 31 Jul 2011 13:58:32 +0000 Subject: [PATCH] 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 --- gtk2_ardour/startup.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 ();