From 9ccc0e415d20cc69a23ae620ac97da183966723a Mon Sep 17 00:00:00 2001 From: HBiSoft Date: Thu, 28 Apr 2022 16:53:12 +0200 Subject: [PATCH] Fix issue #48 --- pickit/src/main/java/com/hbisoft/pickit/PickiT.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pickit/src/main/java/com/hbisoft/pickit/PickiT.java b/pickit/src/main/java/com/hbisoft/pickit/PickiT.java index b380360..41aeac9 100644 --- a/pickit/src/main/java/com/hbisoft/pickit/PickiT.java +++ b/pickit/src/main/java/com/hbisoft/pickit/PickiT.java @@ -173,6 +173,17 @@ else if (docId !=null && docId.startsWith("msf")) { //Todo: Add checks for unknown file extensions if (!subStringExtension.equals("jpeg") && !subStringExtension.equals(extensionFromMime) && uri.getScheme() != null && uri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) { + // First check if the file is available + // With issue #48 the file is available + try { + File checkIfExist = new File(returnedPath); + if (checkIfExist.exists()){ + pickiTCallbacks.PickiTonCompleteListener(returnedPath, false, false, true, ""); + return; + } + }catch (Exception e){ + //Ignore + } isFromUnknownProvider = true; downloadFile(uri); return;