FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

force .zip extension when archiving a sketch (fixes #2526) · unexCoder/processing@df8c827 · GitHub

Repository navigation

Commit df8c827

Browse files
committed
force .zip extension when archiving a sketch (fixes processing#2526)
1 parent 8751f6f commit df8c827

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎app/src/processing/app/tools/Archiver.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ public void run() {
102102
public void fileSelected(File newbie) {
103103
if (newbie != null) {
104104
try {
105+
// Force a .zip extension
106+
// https://github.com/processing/processing/issues/2526
107+
if (!newbie.getName().toLowerCase().endsWith(".zip")) {
108+
newbie = new File(newbie.getAbsolutePath() + ".zip");
109+
}
105110
//System.out.println(newbie);
106111
FileOutputStream zipOutputFile = new FileOutputStream(newbie);
107112
ZipOutputStream zos = new ZipOutputStream(zipOutputFile);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL