Skip to content

Commit

Permalink
Fixed removed storage file
Browse files Browse the repository at this point in the history
  • Loading branch information
istvan-szilagyi committed Nov 21, 2019
1 parent 591a171 commit 730d393
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 730d393

Please sign in to comment.