mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-04-24 08:25:23 +00:00
fix use cursor_path
This commit is contained in:
parent
b271166247
commit
4a533436eb
@ -83,10 +83,14 @@ def get_workbench_cursor_path(translator=None) -> str:
|
||||
base_path = config.get('WindowsPaths', 'cursor_path')
|
||||
elif system == "Darwin":
|
||||
base_path = paths_map[system]["base"]
|
||||
if config.has_section('MacPaths') and config.has_option('MacPaths', 'cursor_path'):
|
||||
base_path = config.get('MacPaths', 'cursor_path')
|
||||
else: # Linux
|
||||
# For Linux, we've already checked all bases in the loop above
|
||||
# If we're here, it means none of the bases worked, so we'll use the first one
|
||||
base_path = paths_map[system]["bases"][0]
|
||||
if config.has_section('LinuxPaths') and config.has_option('LinuxPaths', 'cursor_path'):
|
||||
base_path = config.get('LinuxPaths', 'cursor_path')
|
||||
|
||||
main_path = os.path.join(base_path, paths_map[system]["main"])
|
||||
|
||||
|
@ -236,10 +236,14 @@ def get_workbench_cursor_path(translator=None) -> str:
|
||||
base_path = config.get('WindowsPaths', 'cursor_path')
|
||||
elif system == "Darwin":
|
||||
base_path = paths_map[system]["base"]
|
||||
if config.has_section('MacPaths') and config.has_option('MacPaths', 'cursor_path'):
|
||||
base_path = config.get('MacPaths', 'cursor_path')
|
||||
else: # Linux
|
||||
# For Linux, we've already checked all bases in the loop above
|
||||
# If we're here, it means none of the bases worked, so we'll use the first one
|
||||
base_path = paths_map[system]["bases"][0]
|
||||
if config.has_section('LinuxPaths') and config.has_option('LinuxPaths', 'cursor_path'):
|
||||
base_path = config.get('LinuxPaths', 'cursor_path')
|
||||
|
||||
main_path = os.path.join(base_path, paths_map[system]["main"])
|
||||
|
||||
|
@ -232,9 +232,16 @@ def get_workbench_cursor_path(translator=None) -> str:
|
||||
|
||||
if system == "Windows":
|
||||
base_path = config.get('WindowsPaths', 'cursor_path')
|
||||
else:
|
||||
elif system == "Darwin":
|
||||
base_path = paths_map[system]["base"]
|
||||
main_path = os.path.join(base_path, paths_map[system]["main"])
|
||||
if config.has_section('MacPaths') and config.has_option('MacPaths', 'cursor_path'):
|
||||
base_path = config.get('MacPaths', 'cursor_path')
|
||||
else: # Linux
|
||||
# For Linux, we've already checked all bases in the loop above
|
||||
# If we're here, it means none of the bases worked, so we'll use the first one
|
||||
base_path = paths_map[system]["bases"][0]
|
||||
if config.has_section('LinuxPaths') and config.has_option('LinuxPaths', 'cursor_path'):
|
||||
base_path = config.get('LinuxPaths', 'cursor_path')
|
||||
|
||||
if not os.path.exists(main_path):
|
||||
raise OSError(translator.get('reset.file_not_found', path=main_path) if translator else f"未找到 Cursor main.js 文件: {main_path}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user