Merge pull request #5765 from osmandapp/Fix5003

Fix_5003
This commit is contained in:
Alexander Sytnyk 2018-08-02 12:00:14 +03:00 committed by GitHub
commit e6ae64877a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,7 @@ public class IncrementalChangesManager {
List<String> list = new ArrayList<String>(regionUpdateFiles.monthUpdates.keySet()); List<String> list = new ArrayList<String>(regionUpdateFiles.monthUpdates.keySet());
for (String month : list) { for (String month : list) {
RegionUpdate ru = regionUpdateFiles.monthUpdates.get(month); RegionUpdate ru = regionUpdateFiles.monthUpdates.get(month);
if (ru.obfCreated < dateCreated) { if (ru.obfCreated <= dateCreated) {
log.info("Delete overlapping month update " + ru.file.getName()); log.info("Delete overlapping month update " + ru.file.getName());
resourceManager.closeFile(ru.file.getName()); resourceManager.closeFile(ru.file.getName());
regionUpdateFiles.monthUpdates.remove(month); regionUpdateFiles.monthUpdates.remove(month);
@ -97,7 +97,7 @@ public class IncrementalChangesManager {
if(ru == null) { if(ru == null) {
continue; continue;
} }
if (ru.obfCreated < dateCreated || if (ru.obfCreated <= dateCreated ||
(monthRu != null && ru.obfCreated < monthRu.obfCreated)) { (monthRu != null && ru.obfCreated < monthRu.obfCreated)) {
log.info("Delete overlapping day update " + ru.file.getName()); log.info("Delete overlapping day update " + ru.file.getName());
resourceManager.closeFile(ru.file.getName()); resourceManager.closeFile(ru.file.getName());