Skip to content
GitLab
Menu
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
2dac8e64
Commit
2dac8e64
authored
Sep 02, 2020
by
Jean-Baptiste Mardelle
Browse files
Add corruption check before creating backup file
parent
75e57704
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/project/projectmanager.cpp
View file @
2dac8e64
...
...
@@ -264,6 +264,7 @@ bool ProjectManager::closeCurrentDocument(bool saveChanges, bool quit)
break
;
}
}
::
mlt_pool_purge
();
pCore
->
audioThumbCache
.
clear
();
pCore
->
jobManager
()
->
slotCancelJobs
();
disconnect
(
pCore
->
window
()
->
getMainTimeline
()
->
controller
(),
&
TimelineController
::
durationChanged
,
this
,
&
ProjectManager
::
adjustProjectDuration
);
...
...
@@ -680,6 +681,11 @@ void ProjectManager::slotAutoSave()
scene
.
replace
(
i
.
key
(),
i
.
value
());
}
}
if
(
!
scene
.
contains
(
QLatin1String
(
"<track "
)))
{
// In some unexplained cases, the MLT playlist is corrupted and all tracks are deleted. Don't save in that case.
pCore
->
displayMessage
(
i18n
(
"Project was corrupted, cannot backup. Please close and reopen your project file to recover last backup"
),
ErrorMessage
);
return
;
}
m_project
->
slotAutoSave
(
scene
);
m_lastSave
.
start
();
}
...
...
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