Skip to content

Commit

Permalink
SocketAPI: Ensure messages are consistent owncloud#3944
Browse files Browse the repository at this point in the history
Before we blindly broadcasted the result of a sync action. That was
often different from what a subsequent FILE_STATUS query would report.
  • Loading branch information
ckamm committed Dec 10, 2015
1 parent fd18c56 commit f65a29d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/gui/socketapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f65a29d

Please sign in to comment.