From 24db7d1f9d94034165945f43e8987792edb16533 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 1 Dec 2010 11:12:36 +0000 Subject: [PATCH] fix git-svn-id: https://osmand.googlecode.com/svn/trunk@738 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- .../src/net/osmand/data/index/IndexBatchCreator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java b/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java index f89f664b44..a809920b20 100644 --- a/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java +++ b/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java @@ -435,7 +435,11 @@ public class IndexBatchCreator { return; } if(mbLengh > 3 && (f.getName().endsWith(".odb") || f.getName().endsWith(".obf")) && zip){ - String zipFileName = f.getName().subSequence(0, f.getName().length() - 4)+".zip"; + String n = f.getName(); + if(f.getName().endsWith(".odb")){ + n = f.getName().substring(0, f.getName().length() - 4); + } + String zipFileName = n+".zip"; File zFile = new File(f.getParentFile(), zipFileName); log.info("Zipping file " + f.getName()); try {