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
a2004f7b
Commit
a2004f7b
authored
Apr 04, 2021
by
Julius Künzel
Browse files
Fix broken cache deletion
BUG: 434429
parent
3724e5a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/project/dialogs/temporarydata.cpp
View file @
a2004f7b
...
...
@@ -442,19 +442,7 @@ void TemporaryData::cleanCache()
KMessageBox
::
Continue
)
{
return
;
}
const
QString
currentId
=
m_doc
->
getDocumentProperty
(
QStringLiteral
(
"documentid"
));
for
(
const
QString
&
folder
:
qAsConst
(
folders
))
{
if
(
folder
==
currentId
)
{
// Trying to delete current project's tmp folder. Do not delete, but clear it
deleteCurrentCacheData
();
continue
;
}
if
(
!
m_globalDir
.
exists
(
folder
))
{
continue
;
}
m_globalDir
.
remove
(
folder
);
}
updateGlobalInfo
();
deleteCache
(
folders
);
}
...
...
@@ -845,6 +833,11 @@ void TemporaryData::deleteSelected()
KMessageBox
::
Continue
)
{
return
;
}
deleteCache
(
folders
);
}
void
TemporaryData
::
deleteCache
(
QStringList
&
folders
)
{
const
QString
currentId
=
m_doc
->
getDocumentProperty
(
QStringLiteral
(
"documentid"
));
for
(
const
QString
&
folder
:
qAsConst
(
folders
))
{
if
(
folder
==
currentId
)
{
...
...
@@ -852,7 +845,8 @@ void TemporaryData::deleteSelected()
deleteCurrentCacheData
();
continue
;
}
m_globalDir
.
remove
(
folder
);
QDir
toRemove
(
m_globalDir
.
filePath
(
folder
));
toRemove
.
removeRecursively
();
}
updateGlobalInfo
();
}
...
...
@@ -867,9 +861,10 @@ void TemporaryData::deleteProxy()
KMessageBox
::
Continue
)
{
return
;
}
m_globalDir
.
remove
(
QStringLiteral
(
"proxy"
));
QDir
toRemove
(
m_globalDir
.
filePath
(
QStringLiteral
(
"proxy"
)));
toRemove
.
removeRecursively
();
// We deleted proxy folder, recreate it
m_globalDir
.
mk
path
(
QStringLiteral
(
"
.
"
));
m_globalDir
.
mk
dir
(
QStringLiteral
(
"
proxy
"
));
processProxyDirectory
();
}
...
...
src/project/dialogs/temporarydata.h
View file @
a2004f7b
...
...
@@ -153,6 +153,7 @@ private slots:
void
deleteSelected
();
void
cleanCache
();
void
cleanProxy
();
void
deleteCache
(
QStringList
&
folders
);
signals:
void
disableProxies
();
...
...
Write
Preview
Supports
Markdown
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