Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
CD-Z committed Jun 10, 2023
1 parent 7251275 commit ef9267b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cd-z/react-native-epub-creator",
"version": "1.3.3",
"version": "2.0.0",
"description": "This react-native library create epub file for android and IOS",
"main": "index.ts",
"keywords": [
Expand Down Expand Up @@ -45,7 +45,7 @@
"lib/"
],
"dependencies": {
"@cd-z/epub-constructor": "^1.2.0",
"@cd-z/epub-constructor": "^2.0.0",
"expo-file-system": "^15.2.2",
"react-native-saf-x": "^2.2.1",
"react-native-zip-archive": "^6.0.3"
Expand Down
15 changes: 9 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,15 @@ export default class EpubBuilder {
}

private async pickFolder() {
const folder = await openDocumentTree(true);
if (folder) {
this.outputPath = folder.uri;
return;
}
throw new Error("No permissions to access destination folder granted.");
return new Promise<void>(async (resolve, reject) => {
const folder = await openDocumentTree(true);
if (folder) {
this.outputPath = folder.uri;
resolve();
}

reject("No permissions to access destination folder granted.");
});
}

private async createTempFolder() {
Expand Down

0 comments on commit ef9267b

Please sign in to comment.