Better support when user remove or rename the Shared directory

This commit is contained in:
Olivier Goffart 2014-02-19 15:23:36 +01:00
parent a51f050a08
commit e74f0f2854
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}

View file

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