mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 01:53:27 +03:00
Folder::wipe(): Remove partial downloads and -shm,-wal db files.
This commit is contained in:
parent
1f09a24a72
commit
174e1acbc7
1 changed files with 8 additions and 6 deletions
|
@ -649,6 +649,9 @@ void Folder::wipe()
|
|||
{
|
||||
QString stateDbFile = path()+QLatin1String(".csync_journal.db");
|
||||
|
||||
// Delete files that have been partially downloaded.
|
||||
slotDiscardDownloadProgress();
|
||||
|
||||
_journal.close(); // close the sync journal
|
||||
|
||||
QFile file(stateDbFile);
|
||||
|
@ -661,12 +664,11 @@ void Folder::wipe()
|
|||
} else {
|
||||
qDebug() << "WRN: statedb is empty, can not remove.";
|
||||
}
|
||||
// Check if the tmp database file also exists
|
||||
QString ctmpName = path() + QLatin1String(".csync_journal.db.ctmp");
|
||||
QFile ctmpFile( ctmpName );
|
||||
if( ctmpFile.exists() ) {
|
||||
ctmpFile.remove();
|
||||
}
|
||||
|
||||
// Also remove other db related files
|
||||
QFile::remove( stateDbFile + ".ctmp" );
|
||||
QFile::remove( stateDbFile + "-shm" );
|
||||
QFile::remove( stateDbFile + "-wal" );
|
||||
}
|
||||
|
||||
bool Folder::setIgnoredFiles()
|
||||
|
|
Loading…
Reference in a new issue