mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-06 04:38:29 +02:00
fixed safe_eval for PatchFile. Now condition need to be exactly True instead of everything but False
This commit is contained in:
parent
7866f5ca36
commit
62a2e31ce2
2 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ class PatchDirectory(PatchObject):
|
|||
"""
|
||||
yield {"description": f"Patching {self}"}
|
||||
|
||||
if self.patch.safe_eval(self.configuration["if"], {"extracted_game": extracted_game}) == "False": return
|
||||
if self.patch.safe_eval(self.configuration["if"], env={"extracted_game": extracted_game}) != "True": return
|
||||
|
||||
match self.configuration["mode"]:
|
||||
# if the mode is copy, then simply patch the subfile into the game with the same path
|
||||
|
|
|
@ -31,7 +31,7 @@ class PatchFile(PatchObject):
|
|||
yield {"description": f"Patching {self}"}
|
||||
|
||||
# check if the file should be patched considering the "if" configuration
|
||||
if self.patch.safe_eval(self.configuration["if"], {"extracted_game": extracted_game}) == "False": return
|
||||
if self.patch.safe_eval(self.configuration["if"], env={"extracted_game": extracted_game}) != "True": return
|
||||
|
||||
# check if the path to the game_subpath is inside a szs, and if yes extract it
|
||||
for szs_subpath in filter(lambda path: path.suffix == ".d",
|
||||
|
|
Loading…
Reference in a new issue