mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 00:28:20 -05:00
clean up
This commit is contained in:
parent
7b70938394
commit
0a1907564a
1 changed files with 3 additions and 3 deletions
|
@ -119,11 +119,11 @@ public class ScratchJrUtil {
|
|||
*/
|
||||
public static boolean zipFileAtPath(String sourcePath, String toLocation) {
|
||||
File sourceFile = new File(sourcePath);
|
||||
if (sourceFile.exists()) {
|
||||
sourceFile.delete();
|
||||
}
|
||||
try {
|
||||
BufferedInputStream origin;
|
||||
// we don't need to remove file at `toLocation`
|
||||
// because `FileOutputStream` will overwrite the file
|
||||
// if no `append` parameter is passed
|
||||
FileOutputStream dest = new FileOutputStream(toLocation);
|
||||
ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(
|
||||
dest));
|
||||
|
|
Loading…
Reference in a new issue