Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
7a856171
Commit
7a856171
authored
Apr 15, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure we have a writable storage folder for imported documents
parent
6c5c58af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+15
-0
No files found.
src/doc/kdenlivedoc.cpp
View file @
7a856171
...
@@ -1324,6 +1324,21 @@ void KdenliveDoc::loadDocumentProperties()
...
@@ -1324,6 +1324,21 @@ void KdenliveDoc::loadDocumentProperties()
QDir
dir
(
path
);
QDir
dir
(
path
);
dir
.
cdUp
();
dir
.
cdUp
();
m_projectFolder
=
dir
.
absolutePath
();
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"
));
QString
profile
=
m_documentProperties
.
value
(
QStringLiteral
(
"profile"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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