Skip to content

Commit

Permalink
Fix error if steamui\skins\OldGlory folder isn't created
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonius7 committed Jun 2, 2024
1 parent 91b358a commit 7d023cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,13 +1146,15 @@ def backup_libraryroot_css(install_location="Steam"):
try:
local_libraryroot_custom_css = "libraryroot.custom.css"
if install_location == "Steam":
libraryroot_dir = library_dir()
libraryroot_custom_css = library_dir() + "/" + "libraryroot.custom.css"
libraryroot_custom_css_backup = library_dir() + "/" + "libraryroot.custom.css.backup"
libraryroot_custom_css_backup2 = library_dir() + "/" + "libraryroot.custom.css.backup2"
elif install_location == "Millennium":
local_skin_json = "skin.json"
skin_json = skins_dir() + "/" + "skin.json"
skin_json_backup = skins_dir() + "/" + "skin.json.backup"
libraryroot_dir = skins_dir()
libraryroot_custom_css = skins_dir() + "/" + "libraryroot.custom.css"
libraryroot_custom_css_backup = skins_dir() + "/" + "libraryroot.custom.css.backup"
libraryroot_custom_css_backup2 = skins_dir() + "/" + "libraryroot.custom.css.backup2"
Expand All @@ -1174,6 +1176,7 @@ def backup_libraryroot_css(install_location="Steam"):
print("backed up libraryroot.custom.css to " + libraryroot_custom_css_backup)
shutil.copy2(local_libraryroot_custom_css, libraryroot_custom_css)
elif not os.path.isfile(libraryroot_custom_css):
Path(libraryroot_dir).mkdir(parents=True, exist_ok=True)
shutil.copy2(local_libraryroot_custom_css, libraryroot_custom_css)
print("File " + local_libraryroot_custom_css + " written to " + libraryroot_custom_css)

Expand Down
2 changes: 1 addition & 1 deletion old_glory.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class OldGloryApp(tk.Tk):
def __init__(self, *args, **kwargs):
self.version = "1.1.3.1"
self.version = "1.1.3.2"
self.release = "5.14.1"

### Window Frame
Expand Down
6 changes: 1 addition & 5 deletions skin.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
"author": "Jonius7",
"description": "OldGlory comes to Millennium!",
"name": "OldGlory",
"version": "1.0.0",
"github": {
"owner": "Jonius7",
"repo_name": "SteamUI-OldGlory"
},
"version": "1.0.1",
"discord_support": {
"inviteCodeExcludingLink": "hScVrvxJWy"
},
Expand Down

0 comments on commit 7d023cc

Please sign in to comment.