Skip to content

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

fix file is not deleted

ammarahm-ed1fbdca51010b
diff --git a/apps/mobile/src/utils/filesystem/io.js b/apps/mobile/src/utils/filesystem/io.js
index 6b98cbd0c..beb5c5669 100644
--- a/apps/mobile/src/utils/filesystem/io.js
+++ b/apps/mobile/src/utils/filesystem/io.js
@@ -59,9 +59,11 @@ export async function deleteFile(filename, data) {
try {
let response = await RNFetchBlob.fetch('DELETE', url, headers);
let status = response.info().status;
- if (status >= 200 && status < 300) {
+ let ok = status >= 200 && status < 300;
+ if (ok) {
RNFetchBlob.fs.unlink(delFilePath).catch(console.log);
}
+ return ok;
} catch (e) {
console.log('delete file: ', e, url, headers);
return false;