mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -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