Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
7a856171
Commit
7a856171
authored
Apr 15, 2020
by
Jean-Baptiste Mardelle
Browse files
Ensure we have a writable storage folder for imported documents
parent
6c5c58af
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/doc/kdenlivedoc.cpp
View file @
7a856171
...
...
@@ -1324,6 +1324,21 @@ void KdenliveDoc::loadDocumentProperties()
QDir
dir
(
path
);
dir
.
cdUp
();
m_projectFolder
=
dir
.
absolutePath
();
bool
ok
;
// Ensure document storage folder is writable
QString
documentId
=
QDir
::
cleanPath
(
getDocumentProperty
(
QStringLiteral
(
"documentid"
)));
documentId
.
toLongLong
(
&
ok
,
10
);
if
(
ok
)
{
if
(
!
dir
.
exists
(
documentId
))
{
if
(
!
dir
.
mkpath
(
documentId
))
{
// Invalid storage folder, reset to default
m_projectFolder
.
clear
();
}
}
}
else
{
// Something is wrong, documentid not readable
qDebug
()
<<
"=========
\n\n
Cannot read document id: "
<<
documentId
<<
"
\n\n
=========="
;
}
}
QString
profile
=
m_documentProperties
.
value
(
QStringLiteral
(
"profile"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment