13
0

T: only load LiveTrax sessions

This is rather crude; ideally the check would also test
for plugins, or settings which must not be present in a
LiveTrax session.
This commit is contained in:
Robin Gareus 2024-05-20 18:24:01 +02:00
parent 31f1171225
commit 89bb21c1ba
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1780,7 +1780,21 @@ Session::set_state (const XMLNode& node, int version)
created_with = "unknown";
if ((child = find_named_node (node, "ProgramVersion")) != 0) {
child->get_property (X_("created-with"), created_with);
#ifdef LIVETRAX
std::string modified_with;
child->get_property (X_("modified-with"), modified_with);
if (modified_with.rfind (PROGRAM_NAME, 0) != 0) {
error << string_compose (_("This is not a valid %1 session."), PROGRAM_NAME) << endmsg;
goto out;
}
#endif
}
#ifdef LIVETRAX
else {
error << string_compose (_("This is not a valid %1 session."), PROGRAM_NAME) << endmsg;
goto out;
}
#endif
setup_raid_path(_session_dir->root_path());