Skip to content

ELECTRON: Import correct cloud file when multiple exist#2599

Merged
d0sboots merged 1 commit into
bitburner-official:devfrom
catloversg:pull-request/electron/Handle-multiple-cloud-files-properly
Mar 27, 2026
Merged

ELECTRON: Import correct cloud file when multiple exist#2599
d0sboots merged 1 commit into
bitburner-official:devfrom
catloversg:pull-request/electron/Handle-multiple-cloud-files-properly

Conversation

@catloversg

Copy link
Copy Markdown
Collaborator

When retrieving Steam cloud data, we always use the first file returned from steamworksClient.cloud.listFiles. However, this API can return multiple files, and their order is not guaranteed.

MRE:

  • Load save id "foo" on machine 1 and use "Delete Steam Cloud Data" option to ensure this save file is synced to Steam Cloud.
  • Login Steam on machine 2 and let it sync "foo" to the remote folder.
  • Use "Delete Steam Cloud Data" option again on machine 1 to sync another save id "bar" to Steam Cloud.
  • After a while, Steam will sync "bar" to machine 2. Calling steamworksClient.cloud.listFiles on machine 2 now returns both "foo" and "bar" with no guaranteed order.

The fix is to use the most recently persisted cloud file instead of the first file in that array.

Note:

This PR uses a new version of my fork of steamworks.js.

@d0sboots d0sboots left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the TODOs, I don't want to expand the scope of this beyond what it already is.

Comment thread electron/global.d.ts
@d0sboots d0sboots merged commit 92a8e61 into bitburner-official:dev Mar 27, 2026
6 checks passed
@catloversg catloversg deleted the pull-request/electron/Handle-multiple-cloud-files-properly branch March 27, 2026 03:28
antoinedube pushed a commit to antoinedube/bitburner-source that referenced this pull request Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants