diff options
author | Sampo Savolainen <v2@iki.fi> | 2006-09-25 19:58:47 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2006-09-25 19:58:47 +0000 |
commit | 7b99808a5720b6916ee78d8700d4b9f261e72a2a (patch) | |
tree | de4cc3fd54e9abfdf6e5dfd459571e0c4d86dba4 /libs/ardour/session.cc | |
parent | 75fd93406d1c75d88f56bde0c3229d86af51ca7e (diff) |
Fix the interchange/ directory structure for snapshots
git-svn-id: svn://localhost/ardour2/trunk@925 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 6f7935e9b6..274fcf1b16 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -277,9 +277,12 @@ Session::Session (AudioEngine &eng, first_stage_init (fullpath, snapshot_name); - if (create (new_session, mix_template, _engine.frame_rate() * 60 * 5)) { - cerr << "create failed\n"; - throw failed_constructor (); + new_session = !g_file_test (_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)); + if (new_session) { + if (create (new_session, mix_template, _engine.frame_rate() * 60 * 5)) { + cerr << "create failed\n"; + throw failed_constructor (); + } } if (second_stage_init (new_session)) { @@ -330,9 +333,12 @@ Session::Session (AudioEngine &eng, n_physical_inputs = max (requested_physical_in, _engine.n_physical_inputs()); first_stage_init (fullpath, snapshot_name); - - if (create (new_session, 0, initial_length)) { - throw failed_constructor (); + + new_session = !g_file_test (_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)); + if (new_session) { + if (create (new_session, 0, initial_length)) { + throw failed_constructor (); + } } if (control_out_channels) { |