Commit 38640cf2 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix project storage folder incorrectly stored, resulting on modified project on open

parent fdc29aa4
......@@ -1308,8 +1308,8 @@ QMap<QString, QString> KdenliveDoc::documentProperties()
m_documentProperties.insert(QStringLiteral("version"), QString::number(DOCUMENTVERSION));
m_documentProperties.insert(QStringLiteral("kdenliveversion"), QStringLiteral(KDENLIVE_VERSION));
if (!m_projectFolder.isEmpty()) {
m_documentProperties.insert(QStringLiteral("storagefolder"),
m_projectFolder + QLatin1Char('/') + m_documentProperties.value(QStringLiteral("documentid")));
QDir folder(m_projectFolder);
m_documentProperties.insert(QStringLiteral("storagefolder"), folder.absoluteFilePath(m_documentProperties.value(QStringLiteral("documentid"))));
}
m_documentProperties.insert(QStringLiteral("profile"), pCore->getCurrentProfile()->path());
if (m_documentProperties.contains(QStringLiteral("decimalPoint"))) {
......
......@@ -174,10 +174,11 @@ void ProjectManager::newFile(QString profileName, bool showProjectSettings)
}
if (KdenliveSettings::customprojectfolder()) {
projectFolder = KdenliveSettings::defaultprojectfolder();
QDir folder(projectFolder);
if (!projectFolder.endsWith(QLatin1Char('/'))) {
projectFolder.append(QLatin1Char('/'));
}
documentProperties.insert(QStringLiteral("storagefolder"), projectFolder + documentId);
documentProperties.insert(QStringLiteral("storagefolder"), folder.absoluteFilePath(documentId));
}
} else {
QPointer<ProjectSettings> w = new ProjectSettings(nullptr, QMap<QString, QString>(), QStringList(), projectTracks.first, projectTracks.second, audioChannels, KdenliveSettings::defaultprojectfolder(), false, true, pCore->window());
......
Supports Markdown
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