зеркало из https://github.com/nextcloud/desktop.git
Add and remove watches for folders independent from sync dir.
Before it was just in case of download.
This commit is contained in:
Родитель
e9e132c06c
Коммит
5841cf4020
|
@ -315,29 +315,27 @@ void Folder::bubbleUpSyncResult()
|
|||
logger->postOptionalGuiLog(tr("File %1").arg(item._file), item._errorString);
|
||||
|
||||
} else {
|
||||
// add new directories or remove gone away dirs to the watcher
|
||||
if (item._type == SyncFileItem::Directory &&
|
||||
item._instruction == CSYNC_INSTRUCTION_NEW ) {
|
||||
FolderMan::instance()->addMonitorPath( alias(), path()+item._file );
|
||||
}
|
||||
if (item._type == SyncFileItem::Directory &&
|
||||
item._instruction == CSYNC_INSTRUCTION_REMOVE ) {
|
||||
FolderMan::instance()->removeMonitorPath( alias(), path()+item._file );
|
||||
}
|
||||
|
||||
if (item._dir == SyncFileItem::Down) {
|
||||
switch (item._instruction) {
|
||||
case CSYNC_INSTRUCTION_NEW:
|
||||
newItems++;
|
||||
if (firstItemNew.isEmpty())
|
||||
firstItemNew = item;
|
||||
|
||||
if (item._type == SyncFileItem::Directory) {
|
||||
FolderMan::instance()->addMonitorPath( alias(), path()+item._file );
|
||||
// _watcher->addPath(path() + item._file);
|
||||
}
|
||||
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_REMOVE:
|
||||
removedItems++;
|
||||
if (firstItemDeleted.isEmpty())
|
||||
firstItemDeleted = item;
|
||||
|
||||
if (item._type == SyncFileItem::Directory) {
|
||||
// _watcher->removePath(path() + item._file);
|
||||
FolderMan::instance()->removeMonitorPath( alias(), path()+item._file );
|
||||
}
|
||||
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_CONFLICT:
|
||||
case CSYNC_INSTRUCTION_SYNC:
|
||||
|
|
Загрузка…
Ссылка в новой задаче