From c243e9f2f6258ce9b04c0ca8eaad2a128b4bc968 Mon Sep 17 00:00:00 2001 From: Pin Studios Date: Mon, 21 Apr 2025 14:02:59 +0800 Subject: [PATCH] Add main path retrieval for non-Linux systems in get_workbench_cursor_path function --- totally_reset_cursor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index 6f319dc..00c1f0b 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -243,6 +243,9 @@ def get_workbench_cursor_path(translator=None) -> str: if config.has_section('LinuxPaths') and config.has_option('LinuxPaths', 'cursor_path'): base_path = config.get('LinuxPaths', 'cursor_path') + # Get the main path for non-Linux systems or if Linux path wasn't found in the loop + main_path = os.path.join(base_path, paths_map[system]["main"]) + 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}")