Browse Source

UI: Fix deletion of scene collection backup on collection deletion

When a scene collection is deleted, the generated backup files should
not automatically be deleted. This was new behavior introduced in OBS
30.0.0.

This change restores the prior behavior.
PatTheMav 1 year ago
parent
commit
d9d9881789
1 changed files with 0 additions and 4 deletions
  1. 0 4
      UI/window-basic-main-scene-collections.cpp

+ 0 - 4
UI/window-basic-main-scene-collections.cpp

@@ -165,12 +165,8 @@ const OBSSceneCollection &OBSBasic::CreateSceneCollection(const std::string &col
 
 void OBSBasic::RemoveSceneCollection(OBSSceneCollection collection)
 {
-	std::filesystem::path collectionBackupFile{collection.collectionFile};
-	collectionBackupFile.replace_extension("json.bak");
-
 	try {
 		std::filesystem::remove(collection.collectionFile);
-		std::filesystem::remove(collectionBackupFile);
 	} catch (const std::filesystem::filesystem_error &error) {
 		blog(LOG_DEBUG, "%s", error.what());
 		throw std::logic_error("Failed to remove scene collection file: " + collection.fileName);