Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
There is currently no solution to remove files from the cloud. A user might want to remove their files from the cloud for privacy reasons, or they might have uploaded the wrong folder on accident and included personal information in those files.
How
This PR extends the existing command pool by adding a
save-clear
command to the cli. This command doesn't take all the arguments ofsave-sync
since most of them are unnecessary.It requires
path
,id
and--os|platform
arguments, and accepts--token
and--name
arguments.The command lists all the files in the cloud and uses the existing
remove_file(file)
method to send a DELETE request for each. If it succeeds, the cloud bucket for the game will be empty.Testing
I've tested this by uploading a miscelanious amount of random files, verifying they indeed existed by downloading them and then verifying that they would no longer download after running this command.
Future Plans
I intend to open a PR in the Heroic Launcher repo if/when this gets merged, adding the ability for Heroic users to clear their cloud saves at any time from the Game Settings.