瀏覽代碼

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 年之前
父節點
當前提交
08a94072a0
共有 1 個文件被更改,包括 1 次插入9 次删除
  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;