View Single Post
Old Today, 10:14 AM   #27
dunhill
Wizard
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 1,056
Karma: 1084520
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by DiapDealer View Post
The following code should find the correct Desktop location even if OneDrive backup is enabled (after importing QStandardPaths from qt.core).

Code:
desktop_path = QStandardPaths.writableLocation(QStandardPaths.DesktopLocation)
That's what the documentation claims anyway.
Great catch regarding the OneDrive path! I didn't account for users having their folders redirected.
Huge thanks to DiapDealer for pointing out the QStandardPaths solution. I've updated the plugin to version 1.1.0 using that implementation to dynamically find the correct location, ensuring compatibility regardless of OneDrive settings or system language.
To be even safer, the plugin now downloads the installer to the standard Downloads folder (instead of the Desktop) to avoid any sync conflicts during the process.

Thanks for the feedback and for helping improve the plugin!
dunhill is online now   Reply With Quote