mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
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:
parent
71c5753207
commit
08a94072a0
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue