Fixes issue when saving a pxo and removing its backup

Supersedes #327
This commit is contained in:
OverloadedOrama 2020-09-05 21:55:12 +03:00
parent aa3637cc41
commit 497f0e03cb

View file

@ -496,7 +496,10 @@ func remove_backup(i : int) -> void:
func remove_backup_by_path(project_path : String, backup_path : String) -> void: func remove_backup_by_path(project_path : String, backup_path : String) -> void:
Directory.new().remove(backup_path) Directory.new().remove(backup_path)
Global.config_cache.erase_section_key("backups", project_path) if Global.config_cache.has_section_key("backups", project_path):
Global.config_cache.erase_section_key("backups", project_path)
elif Global.config_cache.has_section_key("backups", backup_path):
Global.config_cache.erase_section_key("backups", backup_path)
Global.config_cache.save("user://cache.ini") Global.config_cache.save("user://cache.ini")