13
0

really fix opening session-archives -- amend 1f80f059be

This commit is contained in:
Robin Gareus 2017-05-06 22:05:26 +02:00
parent 1f80f059be
commit e73755f8fb

View File

@ -218,13 +218,10 @@ inflate_session (const std::string& zipfile, const std::string& target_dir, stri
size_t sep = bn.find_first_of ('/');
if (sep == string::npos) {
error << _("Archive does not contain a session folder") << endmsg;
return 3;
if (sep != string::npos) {
bn = bn.substr (0, sep);
}
bn = bn.substr (0, sep);
if (bn.empty ()) {
error << _("Archive does not contain a valid session structure") << endmsg;
return 4;