Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only download zips if you have file access #10257

Merged
merged 2 commits into from
Nov 1, 2024
Merged

Conversation

srietkerk
Copy link
Contributor

I forgot that there were parts of this PR (#10255) that were actually good fixes that I wanted to keep. I realize now that I could've just reopened that PR, but here we are.

We shouldn't let the user download a zip of their projects if they don't have access to the file system, so I added the check to the Download Zip button. I moved the hasFileAccess function to BrowserUtils because of this. If there are more places where we might want to check for file access, we now have the function in a more accessible place.

The addition of the inGame check to BrowserUtils is no longer being used, however, there were a couple of scenarios where I almost needed a check like this and I think it's just nice to have in case there are needs for it.

Upload target: https://minecraft.makecode.com/app/d06e69d2392ce4bcc73cf7790a8632c0b38adc0a-8bc3309a1d

@srietkerk srietkerk requested a review from a team November 1, 2024 21:58
Copy link
Contributor

@thsparks thsparks left a comment

Choose a reason for hiding this comment

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

👍

@srietkerk srietkerk merged commit 4014649 into master Nov 1, 2024
7 checks passed
@srietkerk srietkerk deleted the srietkerk/zip-checks branch November 1, 2024 22:41
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.

3 participants