From ce64a76dcfb7516bf8cd531937c90ee062984aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=84=E5=87=A4=E7=A7=91=E6=8A=80?= Date: Fri, 14 Feb 2025 14:35:04 +0800 Subject: [PATCH] =?UTF-8?q?clone=E6=97=B6=E4=BF=AE=E6=94=B9=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=90=8D=EF=BC=8C=E4=B9=9F=E8=83=BD=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E6=89=BE=E5=88=B0=E9=A1=B9=E7=9B=AE=E6=A0=B9=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/utils/util.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/utils/util.py b/core/utils/util.py index 31ea5ca6..b3c58f94 100644 --- a/core/utils/util.py +++ b/core/utils/util.py @@ -5,9 +5,8 @@ import socket def get_project_dir(): - projectName = 'xiaozhi-esp32-server' - filePath = os.path.abspath(__file__) - return filePath[:filePath.rfind('/' + projectName + '/') + len(projectName) + 2] + """获取项目根目录""" + return os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))+'/' def get_local_ip():