Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 6f46cd4

Browse files
committed
Fix appendExt
1 parent 31ee048 commit 6f46cd4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void run() {
167167

168168
// find cached result if `key` property exists
169169
String cacheKey = this.taskId;
170-
String ext = this.options.appendExt.isEmpty() ? "." + this.options.appendExt : "";
170+
String ext = this.options.appendExt.isEmpty() ? "" : "." + this.options.appendExt;
171171

172172
if (this.options.key != null) {
173173
cacheKey = RNFetchBlobUtils.getMD5(this.options.key);
@@ -188,6 +188,7 @@ public void run() {
188188
else if(this.options.fileCache)
189189
this.destPath = RNFetchBlobFS.getTmpPath(RNFetchBlob.RCTContext, cacheKey) + ext;
190190

191+
191192
OkHttpClient.Builder clientBuilder;
192193

193194
try {
@@ -497,7 +498,7 @@ private void done(Response resp) {
497498
// and write response data to destination path.
498499
resp.body().bytes();
499500
} catch (Exception ignored) {
500-
ignored.printStackTrace();
501+
// ignored.printStackTrace();
501502
}
502503
this.destPath = this.destPath.replace("?append=true", "");
503504
callback.invoke(null, RNFetchBlobConst.RNFB_RESPONSE_PATH, this.destPath);

0 commit comments

Comments
 (0)