зеркало из 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);
|
logger->postOptionalGuiLog(tr("File %1").arg(item._file), item._errorString);
|
||||||
|
|
||||||
} else {
|
} 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) {
|
if (item._dir == SyncFileItem::Down) {
|
||||||
switch (item._instruction) {
|
switch (item._instruction) {
|
||||||
case CSYNC_INSTRUCTION_NEW:
|
case CSYNC_INSTRUCTION_NEW:
|
||||||
newItems++;
|
newItems++;
|
||||||
if (firstItemNew.isEmpty())
|
if (firstItemNew.isEmpty())
|
||||||
firstItemNew = item;
|
firstItemNew = item;
|
||||||
|
|
||||||
if (item._type == SyncFileItem::Directory) {
|
|
||||||
FolderMan::instance()->addMonitorPath( alias(), path()+item._file );
|
|
||||||
// _watcher->addPath(path() + item._file);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case CSYNC_INSTRUCTION_REMOVE:
|
case CSYNC_INSTRUCTION_REMOVE:
|
||||||
removedItems++;
|
removedItems++;
|
||||||
if (firstItemDeleted.isEmpty())
|
if (firstItemDeleted.isEmpty())
|
||||||
firstItemDeleted = item;
|
firstItemDeleted = item;
|
||||||
|
|
||||||
if (item._type == SyncFileItem::Directory) {
|
|
||||||
// _watcher->removePath(path() + item._file);
|
|
||||||
FolderMan::instance()->removeMonitorPath( alias(), path()+item._file );
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case CSYNC_INSTRUCTION_CONFLICT:
|
case CSYNC_INSTRUCTION_CONFLICT:
|
||||||
case CSYNC_INSTRUCTION_SYNC:
|
case CSYNC_INSTRUCTION_SYNC:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче