fix windows exe front path

This commit is contained in:
jxxghp 2024-06-20 13:21:49 +08:00
parent 9937f6792e
commit 24aa64232f

View File

@ -153,7 +153,10 @@ class SystemChain(ChainBase, metaclass=Singleton):
""" """
获取前端版本 获取前端版本
""" """
version_file = Path(settings.FRONTEND_PATH) / "version.txt" if SystemUtils.is_frozen() and SystemUtils.is_windows():
version_file = settings.CONFIG_PATH.parent / "nginx" / "html" / "version.txt"
else:
version_file = Path(settings.FRONTEND_PATH) / "version.txt"
if version_file.exists(): if version_file.exists():
try: try:
with open(version_file, 'r') as f: with open(version_file, 'r') as f: