removed double json.gz from names of files in the tar

This commit is contained in:
Miriam Baglioni 2020-10-01 17:18:34 +02:00
parent fcaedac980
commit cfb5766c6b
1 changed files with 4 additions and 1 deletions

View File

@ -88,7 +88,10 @@ public class MakeTar implements Serializable {
String p_string = p.toString();
if (!p_string.endsWith("_SUCCESS")) {
String name = p_string.substring(p_string.lastIndexOf("/") + 1);
TarArchiveEntry entry = new TarArchiveEntry(dir_name + "/" + name + ".json.gz");
if(! name.trim().equalsIgnoreCase("context")){
name = "communities_infrastructures.json";
}
TarArchiveEntry entry = new TarArchiveEntry(dir_name + "/" + name );
entry.setSize(fileStatus.getLen());
ar.putArchiveEntry(entry);