diff --git a/patches.py b/patches.py index 3a88698..c42a664 100755 --- a/patches.py +++ b/patches.py @@ -182,7 +182,7 @@ def _cb_save_progress_updated(text: str, value: int, total: int): file.write_meta_file() -def upscale_fontstyle_ini(file: GameFile): +def upscale_fontstyle_ini(file: GameFile, write_meta_file=True): """ Parses FontStyle.ini (from the Fonts folder) and writes a new one with new font sizes. @@ -212,4 +212,5 @@ def upscale_fontstyle_ini(file: GameFile): f.writelines(output) file.patched = True - file.write_meta_file() + if write_meta_file: + file.write_meta_file() diff --git a/tests/test_patches.py b/tests/test_patches.py index b44802c..248a6b4 100644 --- a/tests/test_patches.py +++ b/tests/test_patches.py @@ -55,7 +55,7 @@ def test_fontstyle_ini(self): dummy_file = GameFile(tmp_path) dummy_file.backup_path = self._get_test_file_path("FontStyle-A.ini") - patches.upscale_fontstyle_ini(dummy_file) + patches.upscale_fontstyle_ini(dummy_file, write_meta_file=False) # Compare output with expected output expected = self._get_test_file_data("FontStyle-B.ini")