Check that new files will have id bigger than already existing once was added
@@ -1596,7 +1596,7 @@ public class OWOWCache extends OAbstractWriteCache implements OWriteCache, OCach
nameIdMap.put(nameFileIdEntry.name, nameFileIdEntry.fileId);
}
- if (localFileCounter > 0)
+ if (localFileCounter > 0 && nextInternalId < localFileCounter)
nextInternalId = (int) localFileCounter;
for (Map.Entry<String, Integer> nameIdEntry : nameIdMap.entrySet()) {
