Browse Source

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.
jp9000 8 years ago
parent
commit
08a94072a0
1 changed files with 1 additions and 9 deletions
  1. 1 9
      UI/window-basic-main.cpp

+ 1 - 9
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;