Update Gmeek.py

This commit is contained in:
Meekdai 2024-07-01 16:42:20 +08:00
parent ad55a2b0c0
commit e93fd1b946

View File

@ -74,13 +74,8 @@ class GMEEK():
os.mkdir(self.post_dir) os.mkdir(self.post_dir)
if os.path.exists(self.static_dir): if os.path.exists(self.static_dir):
for item in os.listdir(self.static_dir): target_static_dir = os.path.join(self.root_dir, 'static')
source = os.path.join(self.static_dir, item) shutil.copytree(self.static_dir, target_static_dir)
destination = os.path.join(self.root_dir, item)
if os.path.isdir(source):
shutil.copytree(source, destination)
else:
shutil.copy2(source, destination)
print("Copy static to docs") print("Copy static to docs")
else: else:
print("static not exist") print("static not exist")