Use QStandardPaths instead of guessing ~/Desktop
This commit is contained in:
parent
0ba2ce8fdc
commit
30361eb4bb
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ from PyQt5.QtCore import (
|
|||
QObject,
|
||||
QRunnable,
|
||||
QSettings,
|
||||
QStandardPaths,
|
||||
Qt,
|
||||
QFile,
|
||||
QDir,
|
||||
|
@ -282,7 +283,7 @@ def create_rare_desktop_link(type_of_link):
|
|||
elif platform.system() == "Windows":
|
||||
# Target of shortcut
|
||||
if type_of_link == "desktop":
|
||||
target_folder = os.path.expanduser("~/Desktop/")
|
||||
target_folder = QStandardPaths.writableLocation(QStandardPaths.DesktopLocation)
|
||||
elif type_of_link == "start_menu":
|
||||
target_folder = os.path.expandvars("%appdata%/Microsoft/Windows/Start Menu")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue