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

fix various issues with createWritable for Safari #70

Merged

Conversation

SargisPlusPlus
Copy link
Contributor

@SargisPlusPlus SargisPlusPlus commented Feb 8, 2024

Fixes

This PR address issues found in PR62

  • When obtaining path, swap root/patent to locate path. See comment
  • Use arrow function to properly stringify javascript code passed to worker. See comment

Tested on Safari 17.2

@@ -123,7 +124,7 @@ if (
// So we need to pass the path to the worker. This is a bit hacky and ugly.
const root = await navigator.storage.getDirectory()
const parent = await wm.get(this)
const path = await parent.resolve(root)
const path = await root.resolve(parent)

// Should likely never happen, but just in case...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it did happen :P
swapping root/parent solves it

@jimmywarting jimmywarting merged commit 94c0cb3 into jimmywarting:master Feb 26, 2024
@SargisPlusPlus SargisPlusPlus deleted the fix/create-writable-issues branch February 26, 2024 21:36
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.

None yet

2 participants