Commit eb4aeb4a authored by Nicolas Fella's avatar Nicolas Fella Committed by Dimitris Kardarakos

Save calendars in app specific instead of generic patch

parent 1b769674
Pipeline #6207 passed with stage
in 5 minutes and 4 seconds
......@@ -23,6 +23,7 @@
#include <KConfigGroup>
#include <QDebug>
#include <QRegExp>
#include <QDir>
class CalindoriConfig::Private
{
......@@ -164,5 +165,9 @@ QString CalindoriConfig::calendarFile(const QString& calendarName)
QString CalindoriConfig::filenameToPath(const QString& calendarName)
{
return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/calindori_" + calendarName + ".ics";
QString basePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QDir baseFolder(basePath);
baseFolder.mkpath(QStringLiteral("."));
return basePath + "/calindori_" + calendarName + ".ics";
}
......@@ -146,7 +146,7 @@ QVariantMap LocalCalendar::canCreateFile(const QString& calendarName)
result["success"] = QVariant(true);
result["reason"] = QVariant(QString());
QString targetPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/calindori_" + calendarName + ".ics" ;
QString targetPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/calindori_" + calendarName + ".ics" ;
QFile calendarFile(targetPath);
if(calendarFile.exists())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment