Fix pcl-ue8: operator precedence in GetState() (#360)

Separated assignment from condition so rep contains Call() return value.
Removed incorrect wrapper that prevented state checks from executing.
Now rep values 10/11/12 properly set state.

Fixes #180

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
This commit is contained in:
Levi Neely 2026-03-07 19:40:07 +01:00 committed by GitHub
parent f17fb19b85
commit 1bf831c00f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 14 deletions

View File

@ -161,7 +161,7 @@ int RpcClient::GetState(pCloud_FileState *state, char *path) {
size_t errm_size = 0;
int rep = 0;
if ((rep = this->Call(4, path, &errm, &errm_size)) == 0) {
rep = this->Call(4, path, &errm, &errm_size);
pdbg_logf(D_NOTICE, "rpc_get_state responese rep[%d] path[%s]", rep, path);
if (errm) {
pdbg_logf(D_NOTICE, "The error is %s", errm);
@ -174,8 +174,6 @@ int RpcClient::GetState(pCloud_FileState *state, char *path) {
*state = FileStateNoSync;
} else {
*state = FileStateInvalid;
}
} else {
pdbg_logf(D_ERROR, "rpc_get_state ERROR rep[%d] path[%s]", rep, path);
}
if(errm) {