mirror of
https://github.com/greflm13/StaticGalleryBuilder.git
synced 2026-02-05 11:09:26 +00:00
test rmtree
This commit is contained in:
@@ -123,6 +123,8 @@ def copy_static_files(_args: Args) -> None:
|
|||||||
if os.path.exists(os.path.join(_args.root_directory, ".static")):
|
if os.path.exists(os.path.join(_args.root_directory, ".static")):
|
||||||
print("Removing existing .static folder...")
|
print("Removing existing .static folder...")
|
||||||
shutil.rmtree(os.path.join(_args.root_directory, ".static"))
|
shutil.rmtree(os.path.join(_args.root_directory, ".static"))
|
||||||
|
if not os.path.exists(os.path.join(_args.root_directory, ".static")):
|
||||||
|
print("Copying static files...")
|
||||||
shutil.copytree(STATIC_FILES_DIR, os.path.join(_args.root_directory, ".static"), dirs_exist_ok=True)
|
shutil.copytree(STATIC_FILES_DIR, os.path.join(_args.root_directory, ".static"), dirs_exist_ok=True)
|
||||||
shutil.copyfile(_args.theme_path, os.path.join(_args.root_directory, ".static", "theme.css"))
|
shutil.copyfile(_args.theme_path, os.path.join(_args.root_directory, ".static", "theme.css"))
|
||||||
|
|
||||||
@@ -369,7 +371,6 @@ def main() -> None:
|
|||||||
if not os.path.exists(os.path.join(args.root_directory, ".thumbnails")):
|
if not os.path.exists(os.path.join(args.root_directory, ".thumbnails")):
|
||||||
os.mkdir(os.path.join(args.root_directory, ".thumbnails"))
|
os.mkdir(os.path.join(args.root_directory, ".thumbnails"))
|
||||||
|
|
||||||
print("Copying static files...")
|
|
||||||
copy_static_files(args)
|
copy_static_files(args)
|
||||||
|
|
||||||
if args.generate_webmanifest:
|
if args.generate_webmanifest:
|
||||||
|
|||||||
Reference in New Issue
Block a user