mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +00:00
fix create config.json
This commit is contained in:
parent
fab21e572c
commit
abf8e37e0f
@ -36,8 +36,13 @@ class ConfigManager:
|
||||
base_path = os.path.dirname(sys.executable)
|
||||
|
||||
else:
|
||||
# Use the current directory where the script is executed
|
||||
base_path = os.getcwd()
|
||||
|
||||
# Get the actual path of the module file
|
||||
current_file_path = os.path.abspath(__file__)
|
||||
# Navigate upwards to find the project root
|
||||
# Assuming this file is in a package structure like StreamingCommunity/Util/config_json.py
|
||||
# We need to go up 2 levels to reach the project root
|
||||
base_path = os.path.dirname(os.path.dirname(os.path.dirname(current_file_path)))
|
||||
|
||||
# Initialize file paths
|
||||
self.file_path = os.path.join(base_path, file_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user