13
0

Show error when session-archive loading fails

This commit is contained in:
Robin Gareus 2021-03-11 18:25:22 +01:00
parent 9f3fba6988
commit 48225c10bd
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 2 additions and 3 deletions

View File

@ -182,7 +182,7 @@ ARDOUR_UI::session_dialog_response_handler (int response, SessionDialog* session
if (!likely_new) {
int rv = ARDOUR::inflate_session (session_name, Config->get_default_session_parent_dir(), session_path, session_name);
if (rv < 0) {
if (rv != 0) {
ArdourMessageDialog msg (*session_dialog, string_compose (_("Extracting session-archive failed: %1"), inflate_error (rv)));
msg.run ();
return; /* back to main event loop */

View File

@ -706,10 +706,9 @@ StartupFSM::check_session_parameters (bool must_be_new)
/* See if the specified session is a session archive */
int rv = ARDOUR::inflate_session (session_name, Config->get_default_session_parent_dir(), session_path, session_name);
if (rv < 0) {
if (rv != 0) {
ArdourMessageDialog msg (*session_dialog, string_compose (_("Extracting session-archive failed: %1"), inflate_error (rv)));
msg.run ();
return 1;
} else if (rv == 0) {
/* names are good (and session is unarchived/inflated */