blob: 3dfa862674a5101440df302e45c8376a579ec057 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "pbd/error.h"
#include "ardour/session_directory.h"
#include "i18n.h"
namespace ARDOUR {
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
|