diff options
author | Alexander Tkachev | 2019-08-04 04:36:59 +0700 |
---|---|---|
committer | Alexander Tkachev | 2019-08-04 04:36:59 +0700 |
commit | 1c0b697a59472445e7b8847e566974b503ce012d (patch) | |
tree | 93300c205deb791b667db65aa16d21a35956f142 /engines/voyeur | |
parent | a769bace7fafadd983a243fc86c5c2aff29c2c27 (diff) | |
download | scummvm-rg350-1c0b697a59472445e7b8847e566974b503ce012d.tar.gz scummvm-rg350-1c0b697a59472445e7b8847e566974b503ce012d.tar.bz2 scummvm-rg350-1c0b697a59472445e7b8847e566974b503ce012d.zip |
CLOUD: Fix OneDriveTokenRefresher
If user doesn't have a "saves" folder, listing it as a first step of
syncing save files would result in 404 from OneDrive.
OneDriveTokenRefresher handles token-related errors (401), so when it
meets 404, it calls its finishError method. But because there was some
strange behaviour from OneDrive with sending invalid JSON, this method
tries fixing JSON and parsing it again. If it is valid, it calls
non-error method again, and in result we get stack overflow.
In order to fix that, I've added a non-JSON prefix "<irrecoverable>", so
finishError won't be able to parse JSON and thus won't call finishJson
again. Saves syncing callback does check string contents apart from
trying to parse JSON, so it still works and correctly handles the
situation when "saves" directory is missing. But, if needed, code can be
updated to search for the prefix I've added and remove it before parsing
original JSON.
Diffstat (limited to 'engines/voyeur')
0 files changed, 0 insertions, 0 deletions