Skip to content

Commit

Permalink
refactor: move ICU version file into .local/state
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltf24 authored and thw26 committed Oct 25, 2024
1 parent da48ece commit 07cc8cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ou_dedetai/wine.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,9 @@ def enforce_icu_data_files(app=None):
icu_latest_version = network.get_tag_name(json_data).lstrip('v')

# This file with the tag name of the downloaded release. If it doesn't match latest override the ICU files then write this file
icu_version_path = Path(f"{config.WINEPREFIX}/drive_c/windows/globalization/ICU/{repo.replace('/','_')}_Version.txt")
if icu_version_path.exists() and icu_version_path.read_text().strip() == icu_latest_version:
config_dir = os.path.expanduser(f"~/.local/state/FaithLife-Community/")
icu_version_path = Path(f"{config_dir}/ICU_Version.txt")
if icu_version_path.exists() and icu_version_path.read_text().strip() == f"{repo}\n{icu_latest_version}":
logging.debug(f"ICU Data files already up to date, no need to install.")
if hasattr(app, 'status_evt'):
app.status_q.put("ICU files were already up to date.")
Expand Down Expand Up @@ -473,7 +474,7 @@ def enforce_icu_data_files(app=None):
app.status_q.put("ICU files copied.")
app.root.event_generate(app.status_evt)

icu_version_path.write_text(icu_latest_version)
icu_version_path.write_text(f"{repo}\n{icu_latest_version}")

if app:
if config.DIALOG == "curses":
Expand Down

0 comments on commit 07cc8cb

Please sign in to comment.