Open gtanner opened 12 years ago
The problem is caused by the second set of blackberry.io.sandbox
so if you do this you are good?
blackberry.io.sandbox = true;
webkitRequestFileSystem(PERSISTENT, 1024, function () {
console.log("should get here");
}, function () {
console.log('or here')
});
Correct.
The issue is I want to reset back to the users value of sandbox as fast as possible in cordova. Currently I am resetting it in the success handler (but that leaves time that user code could access the fileSystem and get something that is unexpected)
not sure if we can easily fix this
I wonder if this is another notch in support for redesigning this concept a-la #229?
I am not feeling safe having to flip this flag and allowing a window that the application can get an unexpected copy of the fileSystem.
I am wondering if the sandbox flag would better live as a param to requestFileSystem? That way there is no global state that needs to be managed between requests.
why do you need to unsandbox in cordova?
can you do the same work in the controller webview through an index.js file of an extension which is forever unsandboxed?
You should be able to do blackberry.io.sandbox = sb before the fs.roo.getFile
Still in the callback but sooner
Also it seems as if in your code if it fails the sandbox property will set to unsandbox
Yeah, that code isn't final, just checked it in so you can see it.
I can move the sandbox reset but I am still not a fan and would like this fixed / cleaned up in a future release.
Testcase:
Result: No callback is invoked from the request fileSystem call.