From 730d3930f1671f9821e8afcb02d8a6f70d36940b Mon Sep 17 00:00:00 2001 From: Istvan Szilagyi Date: Thu, 21 Nov 2019 09:37:29 +0200 Subject: [PATCH] Fixed removed storage file --- src/storage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storage.js b/src/storage.js index f0a101e..7fcfba1 100644 --- a/src/storage.js +++ b/src/storage.js @@ -103,7 +103,11 @@ const fixedStorageUri = async (secureStoreOptions) => { const components = currentStorageFileUri.split('persist-storage/'); if (components.length === 2) { const fileName = components[1]; - return `${storageDirectoryUri}${fileName}`; + const uri = `${storageDirectoryUri}${fileName}`; + const { exists } = await FileSystem.getInfoAsync(uri); + if (exists) { + return uri; + } } }