From e93fd1b946e19ded07a1521c6ae1a663b1878652 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Mon, 1 Jul 2024 16:42:20 +0800 Subject: [PATCH] Update Gmeek.py --- Gmeek.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Gmeek.py b/Gmeek.py index 9dcdae7..d79fae9 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -74,13 +74,8 @@ class GMEEK(): os.mkdir(self.post_dir) if os.path.exists(self.static_dir): - for item in os.listdir(self.static_dir): - source = os.path.join(self.static_dir, item) - destination = os.path.join(self.root_dir, item) - if os.path.isdir(source): - shutil.copytree(source, destination) - else: - shutil.copy2(source, destination) + target_static_dir = os.path.join(self.root_dir, 'static') + shutil.copytree(self.static_dir, target_static_dir) print("Copy static to docs") else: print("static not exist")