mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Merge PR-1983 with master (#1983)
This commit is contained in:
parent
fb3055e716
commit
2d6160c843
1 changed files with 8 additions and 3 deletions
|
|
@ -112,9 +112,9 @@ public class ContributionUtils {
|
|||
out = new FileOutputStream(new File(destinationFilename));
|
||||
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len=in.read(buf)) > 0) {
|
||||
out.write(buf, 0, len);
|
||||
int length;
|
||||
while ((length = in.read(buf)) > 0) {
|
||||
out.write(buf, 0, length);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -123,6 +123,11 @@ public class ContributionUtils {
|
|||
} finally {
|
||||
try {
|
||||
if (out != null) out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
if (in != null) in.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue