mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
修复res zip更新路径问题
This commit is contained in:
parent
a0c70af486
commit
a29d6eba7e
@ -384,9 +384,10 @@ class ZhenxunRepoManagerClass:
|
|||||||
tf = zipfile.ZipFile(self.config.RESOURCE_ZIP_FILE)
|
tf = zipfile.ZipFile(self.config.RESOURCE_ZIP_FILE)
|
||||||
tf.extractall(self.config.RESOURCE_UNZIP_PATH)
|
tf.extractall(self.config.RESOURCE_UNZIP_PATH)
|
||||||
logger.debug("解压文件压缩包完成...", LOG_COMMAND)
|
logger.debug("解压文件压缩包完成...", LOG_COMMAND)
|
||||||
self.__copy_files(
|
unzip_dir = next(self.config.RESOURCE_UNZIP_PATH.iterdir())
|
||||||
self.config.RESOURCE_UNZIP_PATH, self.config.RESOURCE_PATH, True
|
self.__copy_files(unzip_dir, self.config.RESOURCE_PATH, True)
|
||||||
)
|
logger.debug("复制资源文件完成!", LOG_COMMAND)
|
||||||
|
shutil.rmtree(self.config.RESOURCE_UNZIP_PATH, ignore_errors=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("解压资源文件失败...", LOG_COMMAND, e=e)
|
logger.error("解压资源文件失败...", LOG_COMMAND, e=e)
|
||||||
raise
|
raise
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user