1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-23 03:02:30 +01:00

Fix default folder creation using the old hardcoded paths

This commit is contained in:
kelteseth 2017-07-06 14:05:33 +02:00
parent e05412d05a
commit 78b5d2dedc

View File

@ -67,25 +67,25 @@ Settings::Settings(ProfileListModel* plm, MonitorListModel* mlm, InstalledListMo
//Create default folders //Create default folders
if (!QDir(appConfigLocation + "/ProfilePackages").exists()) { if (!QDir(m_absoluteStoragePath.toString() + "/ProfilePackages").exists()) {
if (!QDir().mkdir(appConfigLocation + "/ProfilePackages")) { if (!QDir().mkdir(appConfigLocation + "/ProfilePackages")) {
qWarning("ERROR: Cloud not create ProfilePackages dir"); qWarning("ERROR: Cloud not create ProfilePackages dir");
return; return;
} }
} }
if (!QDir(appConfigLocation + "/Profiles").exists()) { if (!QDir(m_absoluteStoragePath.toString() + "/Profiles").exists()) {
if (!QDir().mkdir(appConfigLocation + "/Profiles")) { if (!QDir().mkdir(appConfigLocation + "/Profiles")) {
qWarning("ERROR: Cloud not create Profiles dir"); qWarning("ERROR: Cloud not create Profiles dir");
return; return;
} }
} }
if (!QDir(appConfigLocation + "/Wallpaper").exists()) { if (!QDir(m_absoluteStoragePath.toString() + "/Wallpaper").exists()) {
if (!QDir().mkdir(appConfigLocation + "/Wallpaper")) { if (!QDir().mkdir(appConfigLocation + "/Wallpaper")) {
qWarning("ERROR: Cloud not create Wallpaper dir"); qWarning("ERROR: Cloud not create Wallpaper dir");
return; return;
} }
} }
if (!QDir(appConfigLocation + "/Widgets").exists()) { if (!QDir(m_absoluteStoragePath.toString() + "/Widgets").exists()) {
if (!QDir().mkdir(appConfigLocation + "/Widgets")) { if (!QDir().mkdir(appConfigLocation + "/Widgets")) {
qWarning("ERROR: Cloud not create Widgets dir"); qWarning("ERROR: Cloud not create Widgets dir");
return; return;