Skip to content

Commit ac7ef51

Browse files
committed
Fix issues in #14
1 parent c3cb420 commit ac7ef51

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pickit/src/main/java/com/hbisoft/pickit/DownloadAsyncTask.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ protected String doInBackground(Uri... params) {
9090
if (!isCancelled()) {
9191
total += count;
9292
if (size != -1) {
93-
publishProgress((int) ((total * 100) / size));
93+
try {
94+
publishProgress((int) ((total * 100) / size));
95+
}catch(Exception e){
96+
Log.i("PickiT -", "File size is less than 1");
97+
publishProgress(0);
98+
}
9499
}
95100
fos.write(data, 0, count);
96101
}

0 commit comments

Comments
 (0)