File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
database/table/capacitor-filesystem-table Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export class CapacitorFilesystemTable<T extends Tuple> implements Table<T> {
6161 directory : this . directory ,
6262 path : '' ,
6363 } ) ;
64- if ( ! dirs . files . includes ( this . rootDir ) ) {
64+ if ( ! dirs . files . find ( f => f . name . includes ( this . rootDir ) ) ) {
6565 await this . filesystemPlugin . mkdir ( {
6666 directory : this . directory ,
6767 path : this . rootDir ,
@@ -72,7 +72,7 @@ export class CapacitorFilesystemTable<T extends Tuple> implements Table<T> {
7272 directory : this . directory ,
7373 path : this . rootDir ,
7474 } ) ;
75- return files . files . includes ( `${ this . id } .json` ) ;
75+ return files . files . find ( f => f . name . includes ( `${ this . id } .json` ) ) ;
7676 }
7777
7878 private async createEmptyJson ( ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export class MediaStore {
5151 directory : this . directory ,
5252 path : '' ,
5353 } ) ;
54- if ( ! dirs . files . includes ( this . rootDir ) ) {
54+ if ( ! dirs . files . find ( f => f . name . includes ( this . rootDir ) ) ) {
5555 await this . filesystemPlugin . mkdir ( {
5656 directory : this . directory ,
5757 path : this . rootDir ,
@@ -143,7 +143,10 @@ export class MediaStore {
143143 path : `${ this . rootDir } ` ,
144144 } ) ;
145145 const extension = await this . getExtension ( index ) ;
146- return result . files . includes ( `${ index } .${ extension } ` ) ;
146+ return (
147+ result . files . find ( f => f . name . includes ( `${ index } .${ extension } ` ) ) !==
148+ undefined
149+ ) ;
147150 }
148151
149152 getThumbnailUrl$ ( index : string , mimeType : MimeType ) {
You can’t perform that action at this time.
0 commit comments