Fixed unwanted link following in project deletion that led to deleting

the game source's drawable folder. First steps towards enhancements of
export package generation.
This commit is contained in:
Zukero
2017-12-17 22:40:46 +01:00
parent 259442710b
commit a475180bb5
3 changed files with 177 additions and 23 deletions

View File

@@ -79,15 +79,18 @@ public class FileUtils {
}
private static void zipDir(File dir, String prefix, ZipOutputStream zos) {
if (prefix != "") {
prefix = prefix + File.separator;
}
for (File f : dir.listFiles()) {
if (f.isDirectory()) {
zipDir(f, prefix+File.separator+f.getName(), zos);
zipDir(f, prefix+f.getName(), zos);
} else {
FileInputStream fis;
try {
fis = new FileInputStream(f);
BufferedInputStream origin = new BufferedInputStream(fis, BUFFER);
ZipEntry entry = new ZipEntry(prefix+File.separator+f.getName());
ZipEntry entry = new ZipEntry(prefix+f.getName());
try {
zos.putNextEntry(entry);
int count;