Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed May 13, 2024
1 parent c6aa5f0 commit b07c01d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
val assetsManager = context.assets

try {
// Open the input stream for the asset file
val inputStream: InputStream = assetsManager.open("$path/$filename")

// Create the output file in the documents directory
val databasesFolder =
context.getDatabasePath("defaultDatabase")
.absolutePath
Expand All @@ -79,6 +76,8 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
}
}

val inputStream: InputStream = assetsManager.open("$path/$filename")

// Open the output stream for the output file
val outputStream: OutputStream = FileOutputStream(outputFile)

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,11 @@ export const open = (options: {
};
};

export const moveAssetsDatabase = (args: {
export const moveAssetsDatabase = async (args: {
filename: string;
path?: string;
overwrite?: boolean;
}): boolean => {
}): Promise<boolean> => {
return NativeModules.OPSQLite.moveAssetsDatabase(args);
};

Expand Down

0 comments on commit b07c01d

Please sign in to comment.