Skip to content

Commit

Permalink
Pathing issues?
Browse files Browse the repository at this point in the history
- Fixed some potential pathing issues
  • Loading branch information
Investigamer committed Jun 15, 2022
1 parent e9130b3 commit 8679afb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,11 @@ def initial_state(setting):
# Ensure mandatory folders are created
Path(os.path.join(cwd, "out")).mkdir(mode=511, parents=True, exist_ok=True)
Path(os.path.join(cwd, "tmp")).mkdir(mode=511, parents=True, exist_ok=True)
Path(os.path.join(cwd, "templates")).mkdir(mode=511, parents=True, exist_ok=True)
Path(os.path.join(cwd, "proxyshop/datas")).mkdir(mode=511, parents=True, exist_ok=True)

# Launch the app
__version__ = "v1.1.3"
__version__ = "v1.1.5"
Factory.register('HoverBehavior', gui.HoverBehavior)
Builder.load_file(os.path.join(cwd, "proxyshop/proxyshop.kv"))
ProxyshopApp().run()
3 changes: 2 additions & 1 deletion proxyshop/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ def update_template(temp, callback):
@param temp: Dict containing template information.
@param callback: Callback method to update progress bar.
"""
# Download using authorization?
# Download using authorization
Path(os.path.dirname(temp['path'])).mkdir(mode=511, parents=True, exist_ok=True)
gdrive_download(temp['id'], temp['path'], callback)

# Change the version to match the new version
Expand Down
6 changes: 4 additions & 2 deletions proxyshop/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
CORE TEMPLATES
"""
import os
from pathlib import Path

import proxyshop.text_layers as txt_layers
from proxyshop import format_text, gui
from proxyshop.constants import con
Expand Down Expand Up @@ -109,8 +111,8 @@ def load_template(self):
Opens the template's PSD file in Photoshop.
"""
console.update("Loading PSD template file...")
file_path = os.path.join(con.cwd, f"templates\\{self.template_file_name()}{cfg.file_ext}")
app.load(file_path)
file_path = Path(os.path.join(con.cwd, f"templates\\{self.template_file_name()}{cfg.file_ext}"))
app.load(str(file_path))
return file_path

def load_artwork(self):
Expand Down

0 comments on commit 8679afb

Please sign in to comment.