Fix autostart write path (#1979)

* Fix autostart write path (flameshot-org#1975)

* Fix formating
This commit is contained in:
YizhePKU
2021-10-16 20:17:02 +08:00
committed by GitHub
parent d446f13cc8
commit 7977cbb52c

View File

@@ -250,9 +250,9 @@ void ConfigHandler::setStartupLaunch(const bool start)
<< process.readAll();
}
#elif defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
QString path = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,
"autostart/",
QStandardPaths::LocateDirectory);
QString path =
QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) +
"/autostart/";
QDir autostartDir(path);
if (!autostartDir.exists()) {
autostartDir.mkpath(".");