Skip to content

Commit

Permalink
Add icons to folder if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrgicak committed Jan 6, 2025
1 parent ef0e5d5 commit 6085e13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build_pwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ def build_pwa_for_folder(folder_path):
icons_dir = os.path.join(folder_path, 'icons')
if not os.path.exists(icons_dir):
os.makedirs(icons_dir)
# Copy default icons
default_icons_dir = os.path.join(TEMPLATE_DIR, 'icons')
for icon in os.listdir(default_icons_dir):
# Copy default icons if they don't exist
default_icons_dir = os.path.join(TEMPLATE_DIR, 'icons')
for icon in os.listdir(default_icons_dir):
if not os.path.exists(os.path.join(icons_dir, icon)):
shutil.copy(os.path.join(default_icons_dir, icon), icons_dir)

def main():
Expand Down

0 comments on commit 6085e13

Please sign in to comment.