UI: Always alternatively open backup scene json file

Fixes an issue where scene data would reset if the file was not found,
even if a backup file existed.  This should prevent those remaining
stray cases where user's scenes would seem to be suddenly deleted if the
original file was deleted for some reason or another.  The backup files
should always be available, so this should clear up that last remaining
case.
This commit is contained in:
jp9000 2017-05-04 18:17:42 -07:00
parent 71c5753207
commit 08a94072a0

View file

@ -625,20 +625,12 @@ void OBSBasic::LogScenes()
void OBSBasic::Load(const char *file)
{
if (!file || !os_file_exists(file)) {
blog(LOG_INFO, "No scene file found, creating default scene");
CreateDefaultScene(true);
SaveProject();
return;
}
disableSaving++;
obs_data_t *data = obs_data_create_from_json_file_safe(file, "bak");
if (!data) {
disableSaving--;
blog(LOG_ERROR, "Failed to load '%s', creating default scene",
file);
blog(LOG_INFO, "No scene file found, creating default scene");
CreateDefaultScene(true);
SaveProject();
return;