[Pkg-owncloud-commits] [owncloud-client] 25/89: Let recursive removal also remove the top dir.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:31 UTC 2013


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 c5e435f9bd5f06ef44a453a3d3cb5ea22ff2c6fb
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Fri Dec 6 16:37:30 2013 +0100

    Let recursive removal also remove the top dir.
---
 src/mirall/syncjournaldb.cpp | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index 502fa85..4209f14 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -381,19 +381,21 @@ bool SyncJournalDb::deleteFileRecord(const QString& filename, bool recursively)
     QMutexLocker locker(&_mutex);
 
     if( checkConnect() ) {
-        if (!recursively) {
-            qlonglong phash = getPHash(filename);
-            _deleteFileRecordPhash->bindValue( 0, QString::number(phash) );
+        // if (!recursively) {
+        // always delete the actual file.
 
-            if( !_deleteFileRecordPhash->exec() ) {
-                qWarning() << "Exec error of SQL statement: "
-                           << _deleteFileRecordPhash->lastQuery()
-                           <<  " : " << _deleteFileRecordPhash->lastError().text();
-                return false;
-            }
-            qDebug() <<  _deleteFileRecordPhash->executedQuery() << phash << filename;
-            _deleteFileRecordPhash->finish();
-        } else {
+        qlonglong phash = getPHash(filename);
+        _deleteFileRecordPhash->bindValue( 0, QString::number(phash) );
+
+        if( !_deleteFileRecordPhash->exec() ) {
+            qWarning() << "Exec error of SQL statement: "
+                       << _deleteFileRecordPhash->lastQuery()
+                       <<  " : " << _deleteFileRecordPhash->lastError().text();
+            return false;
+        }
+        qDebug() <<  _deleteFileRecordPhash->executedQuery() << phash << filename;
+        _deleteFileRecordPhash->finish();
+        if( recursively) {
             _deleteFileRecordRecursively->bindValue(0, filename);
             if( !_deleteFileRecordRecursively->exec() ) {
                 qWarning() << "Exec error of SQL statement: "

-- 
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