[Pkg-owncloud-commits] [owncloud-client] 55/69: Folder::wipe(): Remove partial downloads and -shm, -wal db files.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Nov 7 19:41:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 174e1acbc732d91f8d1b4e7f65fb1288d21ec452
Author: Christian Kamm <kamm at incasoftware.de>
Date: Thu Nov 6 12:49:02 2014 +0100
Folder::wipe(): Remove partial downloads and -shm,-wal db files.
---
src/mirall/folder.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index de1f3a2..8b22144 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -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()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list