Skip to content

Conversation

@WebReflection
Copy link
Contributor

@WebReflection WebReflection commented Oct 23, 2025

Description

Apparently, even if a user granted access to a folder, the FileSystemDirectoryHandler works for the current session but it needs to be checked again (the browser will provide options) within a new session.

This MR ensures that if the permission was granted again, when users come back they can decide to grant it once, for the current session, or grant it forever from now on.

Changes

  • added an extra check for permissions even if the handler was previously granted
  • stored both the handler and the original options asked to grant such permission
  • tested everything works fine even after closing and re-launching the browser
  • tested also the worker scenario
  • bumped version in README for the next release

Checklist

  • I have checked make build works locally.
  • I have created / updated documentation for this change (if applicable).

@WebReflection WebReflection force-pushed the better-fs-permission-handler branch from 8c182f5 to 304fb8e Compare October 23, 2025 09:54
@WebReflection
Copy link
Contributor Author

WebReflection commented Oct 23, 2025

Published on npm as https://cdn.jsdelivr.net/npm/@pyscript/core@0.7.8/dist/core.js and https://cdn.jsdelivr.net/npm/@pyscript/core@0.7.8/dist/core.css and tested both locally and online, it works.

@WebReflection WebReflection requested a review from ntoll October 23, 2025 09:56
@WebReflection WebReflection force-pushed the better-fs-permission-handler branch 4 times, most recently from 4e81063 to f03cd02 Compare October 23, 2025 11:10
@WebReflection WebReflection force-pushed the better-fs-permission-handler branch from a2daeaf to 7807745 Compare October 23, 2025 13:56
@WebReflection WebReflection merged commit f8cf58d into pyscript:main Oct 23, 2025
2 checks passed
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