mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
Better support when user remove or rename the Shared directory
This commit is contained in:
parent
a51f050a08
commit
e74f0f2854
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue