Skip to content

Commit

Permalink
Merge branch 'stable' of https://github.com/Egezenn/dota2-minify into…
Browse files Browse the repository at this point in the history
… stable
  • Loading branch information
DotaModdingCommunity committed Feb 22, 2025
2 parents 1100fd0 + 9dcef19 commit e52bf2e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
25 changes: 16 additions & 9 deletions gui.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -455,15 +455,20 @@ class App:
exist_ok=True,
)
for name in os.listdir(mpaths.itembuilds_dir):
if name != "bkup":
os.rename(
os.path.join(
mpaths.itembuilds_dir, name
),
os.path.join(
mpaths.itembuilds_dir, "bkup", name
),
)
try:
if name != "bkup":
os.rename(
os.path.join(
mpaths.itembuilds_dir, name
),
os.path.join(
mpaths.itembuilds_dir,
"bkup",
name,
),
)
except FileExistsError:
pass # backup was created and opendotaguides was replacing the guides already
shutil.unpack_archive(
zip_path, temp_dump_path, "zip"
)
Expand All @@ -477,6 +482,8 @@ class App:
print(
"→ Replaced default guides with OpenDotaGuides guides."
)
if os.path.exists(zip_path):
os.remove(zip_path)
else:
print(
"→ Failed to download latest OpenDotaGuides guides."
Expand Down
1 change: 1 addition & 0 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def modInfo(widget, name, mod_path, event):
height=1,
width=10,
)
infoWindow.bind("<Escape>", lambda e: infoWindow.destroy())
close_button.grid(row=1, column=0, pady=5)


Expand Down

0 comments on commit e52bf2e

Please sign in to comment.