mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-08-03 04:57:36 +08:00
Enhance cursor path retrieval in reset_machine_manual.py for Linux systems
- Updated the get_workbench_cursor_path function to handle Linux systems more effectively. - Added logic to use the first base path if no valid paths are found in the existing loop. - Improved maintainability and clarity of the code by explicitly handling different operating systems.
This commit is contained in:
parent
1e3e9c99eb
commit
9aa09c436e
@ -221,8 +221,12 @@ def get_workbench_cursor_path(translator=None) -> str:
|
|||||||
|
|
||||||
if system == "Windows":
|
if system == "Windows":
|
||||||
base_path = config.get('WindowsPaths', 'cursor_path')
|
base_path = config.get('WindowsPaths', 'cursor_path')
|
||||||
else:
|
elif system == "Darwin":
|
||||||
base_path = paths_map[system]["base"]
|
base_path = paths_map[system]["base"]
|
||||||
|
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]
|
||||||
|
|
||||||
main_path = os.path.join(base_path, paths_map[system]["main"])
|
main_path = os.path.join(base_path, paths_map[system]["main"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user