From: Christian Kamm Date: Thu, 10 Dec 2015 09:24:31 +0000 (+0100) Subject: SocketAPI: Ensure messages are consistent #3944 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1387^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f65a29df5d14132984a14fdb86b2361a0df7a941;p=nextcloud-desktop.git SocketAPI: Ensure messages are consistent #3944 Before we blindly broadcasted the result of a sync action. That was often different from what a subsequent FILE_STATUS query would report. --- diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp index 1f75ad5d5..4d0bf5f69 100644 --- a/src/gui/socketapi.cpp +++ b/src/gui/socketapi.cpp @@ -251,13 +251,9 @@ void SocketApi::slotItemCompleted(const QString &folder, const SyncFileItem &ite return; } + auto status = this->fileStatus(f, item.destination()); const QString path = f->path() + item.destination(); - - QString command = QLatin1String("OK"); - if (Progress::isWarningKind(item._status)) { - command = QLatin1String("ERROR"); - } - broadcastMessage(QLatin1String("STATUS"), path, command); + broadcastMessage(QLatin1String("STATUS"), path, status.toSocketAPIString()); } void SocketApi::slotSyncItemDiscovered(const QString &folder, const SyncFileItem &item)