[Pkg-owncloud-commits] [owncloud-client] 04/33: Better support when user remove or rename the Shared directory
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Feb 27 19:44:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch upstream
in repository owncloud-client.
commit e74f0f285499d29311620d556ce728e9c47980f6
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Feb 19 15:23:36 2014 +0100
Better support when user remove or rename the Shared directory
---
src/mirall/owncloudpropagator.cpp | 2 +-
src/mirall/syncjournaldb.cpp | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index 31b65ba..5d7cc11 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -1107,7 +1107,7 @@ bool OwncloudPropagator::isInSharedDirectory(const QString& file)
// The Shared directory is synced as its own sync connection
re = true;
} else {
- if( file.startsWith("Shared/") ) {
+ if( file.startsWith("Shared/") || file == "Shared" ) {
// The whole ownCloud is synced and Shared is always a top dir
re = true;
}
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index d58dced..386e43b 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -785,8 +785,9 @@ void SyncJournalDb::avoidRenamesOnNextSync(const QString& path)
}
QSqlQuery query(_db);
- query.prepare("UPDATE metadata SET fileid = '', inode = '0' WHERE path LIKE(?||'/%')");
+ query.prepare("UPDATE metadata SET fileid = '', inode = '0' WHERE path == ? OR path LIKE(?||'/%')");
query.bindValue(0, path);
+ query.bindValue(1, path);
if( !query.exec() ) {
qDebug() << "SQL error in avoidRenamesOnNextSync: "<< query.lastError().text();
} else {
--
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