[fix]path bug

This commit is contained in:
zhu yu 2024-12-01 16:56:54 +08:00
parent d680a9ae21
commit 8948d67844
2 changed files with 4 additions and 2 deletions

View File

@ -37,7 +37,8 @@ def find_path(name: str, path: str = None) -> str:
"""
# If no path is given, use the current working directory
if path is None:
path = os.getcwd()
# path = os.getcwd()
path = os.path.dirname(__file__)
# Check if the current directory contains the name
if name in os.listdir(path):

View File

@ -37,7 +37,8 @@ def find_path(name: str, path: str = None) -> str:
"""
# If no path is given, use the current working directory
if path is None:
path = os.getcwd()
# path = os.getcwd()
path = os.path.dirname(__file__)
# Check if the current directory contains the name
if name in os.listdir(path):