forked from mirrors/cursor-free-vip
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:
@@ -221,8 +221,12 @@ 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"]
|
||||
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"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user