David Robillard
bb9cc45cd2
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
42 lines
672 B
C++
42 lines
672 B
C++
|
|
#include "pbd/error.h"
|
|
|
|
#include <stdint.h>
|
|
#include "ardour/session_directory.h"
|
|
|
|
#include "i18n.h"
|
|
|
|
namespace ARDOUR {
|
|
|
|
using namespace std;
|
|
using namespace PBD;
|
|
|
|
bool
|
|
create_session_directory (const string& session_directory_path)
|
|
{
|
|
SessionDirectory sdir(session_directory_path);
|
|
|
|
try
|
|
{
|
|
// create all the required session directories
|
|
sdir.create();
|
|
}
|
|
catch(sys::filesystem_error& ex)
|
|
{
|
|
// log the exception
|
|
warning << string_compose
|
|
(
|
|
_("Unable to create session directory at path %1 : %2"),
|
|
session_directory_path,
|
|
ex.what()
|
|
);
|
|
|
|
return false;
|
|
}
|
|
|
|
// successfully created the session directory
|
|
return true;
|
|
}
|
|
|
|
} // namespace ARDOUR
|