File tree Expand file tree Collapse file tree
packages/wa-sqlite-driver/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,7 +142,9 @@ export class OPFSCoopSyncVFS2 extends FacadeVFS {
142142 // Populate temporary directory.
143143 for ( let i = 0 ; i < nTemporaryFiles ; i ++ ) {
144144 const tmpFile = await tmpDir . getFileHandle ( `${ i } .tmp` , { create : true } ) ;
145- const tmpAccessHandle = await ( tmpFile as any ) . createSyncAccessHandle ( ) ;
145+ const tmpAccessHandle = await ( tmpFile as any ) . createSyncAccessHandle ( {
146+ mode : 'readwrite-unsafe'
147+ } ) ;
146148 this . unboundAccessHandles . add ( tmpAccessHandle ) ;
147149 }
148150 }
@@ -541,7 +543,7 @@ export class OPFSCoopSyncVFS2 extends FacadeVFS {
541543 if ( subPersistentFile ) {
542544 subPersistentFile . accessHandle = await (
543545 subPersistentFile . fileHandle as any
544- ) . createSyncAccessHandle ( ) ;
546+ ) . createSyncAccessHandle ( { mode : 'readwrite-unsafe' } ) ;
545547 }
546548 } )
547549 ) ;
@@ -582,7 +584,7 @@ export class OPFSCoopSyncVFS2 extends FacadeVFS {
582584 setTimeout ( notify ) ;
583585
584586 this . log ?.( `lock requested: ${ lockName } ` ) ;
585- navigator . locks . request ( lockName , ( lock ) => {
587+ navigator . locks . request ( lockName , { mode : 'shared' } , ( lock ) => {
586588 // We have the lock. Stop asking other connections for it.
587589 this . log ?.( `lock acquired: ${ lockName } ` , lock ) ;
588590 clearInterval ( notifyId ) ;
You can’t perform that action at this time.
0 commit comments