Fix small issues

This commit is contained in:
Victor Shcherb 2012-01-08 02:10:23 +01:00
parent 291f2b909b
commit aaf354d4d4

View file

@ -232,7 +232,11 @@ public class IndexUploader {
throw new OneFileException("Not supported file format " + fileName);
}
String regionName = fileName.substring(0, fileName.lastIndexOf('_', fileName.indexOf('.')));
int last = fileName.lastIndexOf('_', fileName.indexOf('.'));
if (last == -1) {
last = fileName.indexOf('.');
}
String regionName = fileName.substring(0, last);
summary += regionName;
summary = summary.replace('_', ' ');