diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-06 14:47:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-06 14:47:50 +0200 |
commit | bc713b00c355e3640f54135a019d8d8c5cd143ff (patch) | |
tree | 6159eb11f5b5e6f22a472a09fbd285bb5409e021 /session_utils/common.cc | |
parent | d98b722a28b2b6b998a6382da6dcff8345e287dc (diff) |
Improve help text and error-reporting for ardour-export
Diffstat (limited to 'session_utils/common.cc')
-rw-r--r-- | session_utils/common.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/session_utils/common.cc b/session_utils/common.cc index 99ed10d32d..eb17cfdbeb 100644 --- a/session_utils/common.cc +++ b/session_utils/common.cc @@ -123,6 +123,12 @@ static Session * _load_session (string dir, string state) std::string v; std::string s = Glib::build_filename (dir, state + statefile_suffix); + + if (!Glib::file_test (s, Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_REGULAR)) { + std::cerr << "Cannot read session '"<< s << "'\n"; + return 0; + } + if (Session::get_info_from_path (s, sr, sf, v) == 0) { if (engine->set_sample_rate (sr)) { std::cerr << "Cannot set session's samplerate.\n"; |