Skip to content

Commit

Permalink
Merge pull request MoSync#480 from asarrafi/ThreeThree
Browse files Browse the repository at this point in the history
[MOSYNC-3287] Fixed an issue with capture files.
  • Loading branch information
ghuman committed May 28, 2013
2 parents 30c910b + 90aae15 commit e97395f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,10 @@ private static boolean copyFile(File sourceFile, File destFile) throws IOExcepti
destFile.createNewFile();
}

source = openFile(sourceFile);
destination = openFile(destFile);
//No need to use the extra protection of OpenFile here
// WE will close the resources in the Finally block
source = new FileInputStream(sourceFile).getChannel();
destination = new FileOutputStream(destFile).getChannel();

destination.transferFrom(source, 0, source.size());
}
Expand Down

0 comments on commit e97395f

Please sign in to comment.