Commit 93a7af32 authored by Riegel's avatar Riegel
Browse files

Fix: Correct ZipEntry name parsing

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 4 additions and 4 deletions
+4 -4
...@@ -32,7 +32,7 @@ public class CityGmlZipEntry { ...@@ -32,7 +32,7 @@ public class CityGmlZipEntry {
try { try {
CityGmlParser.gagLogger(true); CityGmlParser.gagLogger(true);
CityDoctorModel model = CityGmlParser.parseCityGmlZipEntry(entry, archive, config); CityDoctorModel model = CityGmlParser.parseCityGmlZipEntry(entry, archive, config);
return new CityGmlZipEntry(entry.getName(), model); return new CityGmlZipEntry(entry, model);
} catch (CityGmlParseException | InvalidGmlFileException e) { } catch (CityGmlParseException | InvalidGmlFileException e) {
logger.error(e); logger.error(e);
return new ErroneousEntry(entry, ZipEntryErrorType.INVALID_CITY_GML_FILE); return new ErroneousEntry(entry, ZipEntryErrorType.INVALID_CITY_GML_FILE);
...@@ -43,13 +43,13 @@ public class CityGmlZipEntry { ...@@ -43,13 +43,13 @@ public class CityGmlZipEntry {
} }
} }
private CityGmlZipEntry(String filename, CityDoctorModel model){ private CityGmlZipEntry(ZipEntry entry, CityDoctorModel model){
this.fileName = filename; this.fileName = entry.getName().substring(entry.getName().lastIndexOf('/') + 1);
this.model = model; this.model = model;
} }
protected CityGmlZipEntry(ZipEntry entry) { protected CityGmlZipEntry(ZipEntry entry) {
this.fileName = entry.getName(); this.fileName = entry.getName().substring(entry.getName().lastIndexOf('/') + 1);
this.model = null; this.model = null;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment