Add session-archive error messages

This commit is contained in:
Robin Gareus 2023-05-18 18:54:46 +02:00
parent ffa893f23c
commit b3d3944451
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 3 additions and 0 deletions

View File

@ -5566,6 +5566,7 @@ Session::archive_session (const std::string& dest,
Progress* progress)
{
if (dest.empty () || name.empty ()) {
error << _("Cannot archive session: invalid destination path/name") << endmsg;
return -1;
}
@ -5592,6 +5593,7 @@ Session::archive_session (const std::string& dest,
}
}
if (!ok) {
error << _("Cannot archive: session media-search path does not include current session-path.") << endmsg;
return -1;
}
@ -5613,6 +5615,7 @@ Session::archive_session (const std::string& dest,
if (!_session_dir->create()) {
(*_session_dir) = old_sd;
remove_directory (to_dir);
error << string_compose(_("Session archive failed to create SessionDirectory `%1'"), to_dir) << endmsg;
return -1;
}