mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 20:43:50 -06:00
fix: restore the profile when the prose read fails
_apply_writes promoted the bumped profile, then read its prose under the new pin. A NotCachedError, RateLimitError or UpstreamError from that read left the profile written with a pin the guard would refuse. The original bytes are now put back before the error goes on.
This commit is contained in:
1 parent
f8dce8f8c3
commit
f9a786896e
2 files changed
+21
-2
No files matched your search
@@ -4627,8 +4627,14 @@ def _apply_writes(
|
||||
# The guard above read the prose under the pins the profile held.
|
||||
# A bump that moves upstream_commit can leave prose the report
|
||||
# judged in the fork under the new upstream pin (dolphin-mmjr2,
|
||||
# hatari, xenios): read it again on what was written.
|
||||
left = realign_prose(path, args.cache_dir, args.offline, dry_run=True)
|
||||
# hatari, xenios): read it again on what was written. It reads
|
||||
# the profile's own history, so it runs on the real path, and a
|
||||
# read that fails (offline, rate limit) puts the profile back.
|
||||
try:
|
||||
left = realign_prose(path, args.cache_dir, args.offline, dry_run=True)
|
||||
except BaseException:
|
||||
path.write_bytes(original)
|
||||
raise
|
||||
if moved and left:
|
||||
path.write_bytes(original)
|
||||
print(
|
||||
|
||||
Reference in new issue
Block a user