Update version to 1.10.02, enhance CHANGELOG with new project guidelines, and implement a function to retrieve user Documents folder path in reset_machine_manual.py and totally_reset_cursor.py.

This commit is contained in:
yeongpin
2025-04-16 11:33:17 +08:00
parent bdb7fa4ddf
commit 56f9a86e7a
4 changed files with 41 additions and 4 deletions

View File

@@ -11,7 +11,6 @@ import tempfile
from colorama import Fore, Style, init
from typing import Tuple
import configparser
from new_signup import get_user_documents_path
import traceback
from config import get_config
import glob
@@ -30,6 +29,20 @@ EMOJI = {
"WARNING": "⚠️",
}
def get_user_documents_path():
"""Get user Documents folder path"""
if sys.platform == "win32":
return os.path.join(os.path.expanduser("~"), "Documents")
elif sys.platform == "darwin":
return os.path.join(os.path.expanduser("~"), "Documents")
else: # Linux
# Get actual user's home directory
sudo_user = os.environ.get('SUDO_USER')
if sudo_user:
return os.path.join("/home", sudo_user, "Documents")
return os.path.join(os.path.expanduser("~"), "Documents")
def get_cursor_paths(translator=None) -> Tuple[str, str]:
""" Get Cursor related paths"""
system = platform.system()