Skip to content

Commit

Permalink
[MOSYNC-3287] Fixed an issue with capture files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Sarrafi committed May 28, 2013
1 parent 58bcb39 commit 90aae15
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 90aae15

Please sign in to comment.