Skip to content

Commit a70df81

Browse files
committed
Revert "Fix: create zip without multimedia"
This reverts commit 921453e.
1 parent f126a61 commit a70df81

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

app/src/main/java/net/osmtracker/gpx/ZipHelper.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ public static File zipCacheFiles(Context context, long trackId, File fileGPX) {
3636
try (FileOutputStream fos = new FileOutputStream(zipFile);
3737
ZipOutputStream zos = new ZipOutputStream(fos)) {
3838

39-
// Add gpx file
40-
addFileToZip(fileGPX, zos);
41-
42-
if(!traceFilesDirectory.exists()){
43-
return zipFile;
44-
}
45-
4639
for (File multimediaFile : Objects.requireNonNull(traceFilesDirectory.listFiles())) {
4740
if (!multimediaFile.isDirectory()) { // Avoid adding empty folders
4841
// only add files that are not .zip files
@@ -56,6 +49,9 @@ public static File zipCacheFiles(Context context, long trackId, File fileGPX) {
5649
}
5750
}
5851

52+
// Adds the original gpx file
53+
addFileToZip(fileGPX, zos);
54+
5955
Log.d(TAG, "ZIP file created: " + zipFile.getAbsolutePath());
6056
return zipFile;
6157

@@ -111,4 +107,4 @@ private static void addFileToZip(File file, ZipOutputStream zos) throws IOExcept
111107
zos.closeEntry();
112108
}
113109
}
114-
}
110+
}

0 commit comments

Comments
 (0)