()
| 11 | |
| 12 | |
| 13 | def safe_search_dirs(): |
| 14 | dirs = [ |
| 15 | Path(os.environ.get("APPDATA", "")) / r"Microsoft\Windows\Start Menu\Programs", |
| 16 | Path(os.environ.get("PROGRAMDATA", "")) / r"Microsoft\Windows\Start Menu\Programs", |
| 17 | Path(os.environ.get("USERPROFILE", "")) / "Desktop", |
| 18 | Path(os.environ.get("PUBLIC", r"C:\Users\Public")) / "Desktop", |
| 19 | Path(os.environ.get("LOCALAPPDATA", "")) / "Programs", |
| 20 | Path(os.environ.get("ProgramFiles", r"C:\Program Files")), |
| 21 | Path(os.environ.get("ProgramFiles(x86)", r"C:\Program Files (x86)")), |
| 22 | ] |
| 23 | return [path for path in dirs if path and path.exists()] |
| 24 | |
| 25 | |
| 26 | def app_name_from_path(path): |
no test coverage detected