Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: save to files crashes when open from share sheet

ammarahm-ed881e1a02c0d4
diff --git a/apps/mobile/app/components/sheets/export-notes/index.js b/apps/mobile/app/components/sheets/export-notes/index.js
index addf6210e..34c79d6c6 100644
--- a/apps/mobile/app/components/sheets/export-notes/index.js
+++ b/apps/mobile/app/components/sheets/export-notes/index.js
@@ -249,7 +249,7 @@ const ExportNotesSheet = () => {
onPress={async () => {
if (Platform.OS === "ios") {
Share.open({
- url: "file:/" + result.filePath
+ url: result.filePath
}).catch(console.log);
} else {
FileViewer.open(result.filePath, {
diff --git a/apps/mobile/app/components/sheets/recovery-key/index.js b/apps/mobile/app/components/sheets/recovery-key/index.js
index 0671e8ff7..e6b3e7f61 100644
--- a/apps/mobile/app/components/sheets/recovery-key/index.js
+++ b/apps/mobile/app/components/sheets/recovery-key/index.js
@@ -195,7 +195,7 @@ class RecoveryKeySheet extends React.Component {
try {
if (Platform.OS === "ios") {
Share.open({
- url: "file:/" + path,
+ url: path,
failOnCancel: false
}).catch(console.log);
} else {
diff --git a/apps/mobile/app/services/backup.js b/apps/mobile/app/services/backup.js
index b50a0571f..e99737ce1 100644
--- a/apps/mobile/app/services/backup.js
+++ b/apps/mobile/app/services/backup.js
@@ -114,8 +114,8 @@ async function presentBackupCompleteSheet(backupFilePath) {
action: () => {
if (Platform.OS === "ios") {
Share.open({
- url: "file:/" + backupFilePath,
- failOnCancel: false
+ url: backupFilePath,
+ failOnCancel: false,
}).catch(console.log);
} else {
FileViewer.open(backupFilePath, {