diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index ace5524cb3d91..18dc54c03d977 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -653,8 +653,11 @@ void Folder::slotFilesLockReleased(const QSet &files) && rec._lockstate._lockOwnerId == _accountState->account()->davUser(); if (!canUnlockFile) { - qCDebug(lcFolder) << "Skipping file" << file << "with rec.isValid():" << rec.isValid() - << "and rec._lockstate._lockOwnerId:" << rec._lockstate._lockOwnerId << "and davUser:" << _accountState->account()->davUser(); + qCDebug(lcFolder) << "Skipping file" << file + << "with rec.isValid():" << rec.isValid() + << "and rec._lockstate._lockOwnerId:" << rec._lockstate._lockOwnerId + << "and lock type:" << rec._lockstate._lockOwnerType + << "and davUser:" << _accountState->account()->davUser(); continue; } const QString remoteFilePath = remotePathTrailingSlash() + rec.path(); diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index a0cb64cbb7d97..2d226c1a00f2a 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -463,6 +463,8 @@ void ProcessDirectoryJob::processFile(PathTuple path, const auto hasLocal = localEntry.isValid() ? "true" : _queryLocal == ParentNotChanged ? "db" : "false"; const auto serverFileIsLocked = (serverEntry.isValid() ? (serverEntry.locked == SyncFileItem::LockStatus::LockedItem ? "locked" : "not locked") : ""); const auto localFileIsLocked = dbEntry._lockstate._locked ? "locked" : "not locked"; + const auto serverFileLockType = serverEntry.isValid() ? QString::number(static_cast(serverEntry.lockOwnerType)) : QStringLiteral(""); + const auto localFileLockType = dbEntry._lockstate._locked ? QString::number(static_cast(dbEntry._lockstate._lockOwnerType)) : QStringLiteral(""); qCInfo(lcDisco).nospace() << "Processing " << path._original << " | (db/local/remote)" << " | valid: " << dbEntry.isValid() << "/" << hasLocal << "/" << hasServer @@ -476,6 +478,7 @@ void ProcessDirectoryJob::processFile(PathTuple path, << " | e2ee: " << dbEntry.isE2eEncrypted() << "/" << serverEntry.isE2eEncrypted() << " | e2eeMangledName: " << dbEntry.e2eMangledName() << "/" << serverEntry.e2eMangledName << " | file lock: " << localFileIsLocked << "//" << serverFileIsLocked + << " | file lock type: " << localFileLockType << "//" << serverFileLockType << " | metadata missing: /" << localEntry.isMetadataMissing << '/'; if (localEntry.isValid() diff --git a/src/libsync/lockfilejobs.cpp b/src/libsync/lockfilejobs.cpp index d1d0f98b9b9a4..58eed5b6deafb 100644 --- a/src/libsync/lockfilejobs.cpp +++ b/src/libsync/lockfilejobs.cpp @@ -47,7 +47,7 @@ LockFileJob::LockFileJob(const AccountPtr account, void LockFileJob::start() { - qCInfo(lcLockFileJob()) << "start" << path() << _requestedLockState; + qCInfo(lcLockFileJob()) << "start" << path() << _requestedLockState << _requestedLockOwnerType; QNetworkRequest request; request.setRawHeader(QByteArrayLiteral("X-User-Lock"), QByteArrayLiteral("1")); @@ -77,7 +77,7 @@ void LockFileJob::start() bool LockFileJob::finished() { if (reply()->error() != QNetworkReply::NoError) { - qCInfo(lcLockFileJob()) << "finished with error" << reply()->error() << reply()->errorString(); + qCInfo(lcLockFileJob()) << "finished with error" << reply()->error() << reply()->errorString() << _requestedLockState << _requestedLockOwnerType; const auto httpErrorCode = reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); if (httpErrorCode == LOCKED_HTTP_ERROR_CODE) { const auto record = handleReply(); @@ -97,7 +97,7 @@ bool LockFileJob::finished() Q_EMIT finishedWithError(httpErrorCode, reply()->errorString(), {}); } } else { - qCInfo(lcLockFileJob()) << "success" << path(); + qCInfo(lcLockFileJob()) << "success" << path() << _requestedLockState << _requestedLockOwnerType; handleReply(); Q_EMIT finishedWithoutError(); }