From 24aa64232f10d3f48551af7ca42c4b1b75f5d527 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 20 Jun 2024 13:21:49 +0800 Subject: [PATCH] fix windows exe front path --- app/chain/system.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/chain/system.py b/app/chain/system.py index 41499c7b..bae775de 100644 --- a/app/chain/system.py +++ b/app/chain/system.py @@ -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(): try: with open(version_file, 'r') as f: