From 08a94072a0b72e703f9b724cdc083ea05c233e7c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 4 May 2017 18:17:42 -0700 Subject: [PATCH] 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. --- UI/window-basic-main.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 1b20da971..3328ece68 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -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;