From: Hannah von Reth Date: Fri, 27 Nov 2020 11:00:46 +0000 (+0100) Subject: Improve log message X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~64 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0eabc75039f2a74cc1fac396e363db5ed3900b91;p=nextcloud-desktop.git Improve log message --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 8c2ebc155..89bdf70ce 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1224,11 +1224,11 @@ bool ProcessDirectoryJob::checkPermissions(const OCC::SyncFileItemPtr &item) return true; } if (!perms.hasPermission(RemotePermissions::CanWrite)) { - qCWarning(lcDisco) << "checkForPermission: RESTORING" << item->_file; item->_instruction = CSYNC_INSTRUCTION_CONFLICT; item->_errorString = tr("Not allowed to upload this file because it is read-only on the server, restoring"); item->_direction = SyncFileItem::Down; item->_isRestoration = true; + qCWarning(lcDisco) << "checkForPermission: RESTORING" << item->_file << item->_errorString; // Take the things to write to the db from the "other" node (i.e: info from server). // Do a lookup into the csync remote tree to get the metadata we need to restore. qSwap(item->_size, item->_previousSize); @@ -1244,12 +1244,11 @@ bool ProcessDirectoryJob::checkPermissions(const OCC::SyncFileItemPtr &item) forbiddenIt -= 1; if (forbiddenIt != _discoveryData->_forbiddenDeletes.end() && fileSlash.startsWith(forbiddenIt.key())) { - - qCWarning(lcDisco) << "checkForPermission: RESTORING" << item->_file; item->_instruction = CSYNC_INSTRUCTION_NEW; item->_direction = SyncFileItem::Down; item->_isRestoration = true; item->_errorString = tr("Moved to invalid target, restoring"); + qCWarning(lcDisco) << "checkForPermission: RESTORING" << item->_file << item->_errorString; return true; // restore sub items } const auto perms = item->_remotePerm; @@ -1258,11 +1257,11 @@ bool ProcessDirectoryJob::checkPermissions(const OCC::SyncFileItemPtr &item) return true; } if (!perms.hasPermission(RemotePermissions::CanDelete)) { - qCWarning(lcDisco) << "checkForPermission: RESTORING" << item->_file; item->_instruction = CSYNC_INSTRUCTION_NEW; item->_direction = SyncFileItem::Down; item->_isRestoration = true; item->_errorString = tr("Not allowed to remove, restoring"); + qCWarning(lcDisco) << "checkForPermission: RESTORING" << item->_file << item->_errorString; return true; // (we need to recurse to restore sub items) } break; diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 24090197f..24b4fb155 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -173,7 +173,7 @@ QPair DiscoveryPhase::findAndCancelDeletedJob(const QString &o || ((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW) || ((*it)->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW))) { - qCWarning(lcDiscovery) << "OC_ENFORCE(FAILING)"; + qCWarning(lcDiscovery) << "ENFORCE(FAILING)" << originalPath; qCWarning(lcDiscovery) << "instruction == CSYNC_INSTRUCTION_REMOVE" << (instruction == CSYNC_INSTRUCTION_REMOVE); qCWarning(lcDiscovery) << "((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW)" << ((*it)->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW);