Move timestamp logic into a safe place
This commit is contained in:
parent
e3d5990dbe
commit
2a7e69e281
1 changed files with 2 additions and 1 deletions
|
|
@ -155,11 +155,12 @@ public abstract class DynmapWorld {
|
|||
}
|
||||
try {
|
||||
MapStorageTile.TileRead tr = tile1.read();
|
||||
mostRecentTimestamp = Math.max(mostRecentTimestamp, tr.lastModified);
|
||||
if (tr != null) {
|
||||
BufferedImage im = null;
|
||||
try {
|
||||
im = ImageIOManager.imageIODecode(tr);
|
||||
// Only consider the timestamp when the tile exists and isn't broken
|
||||
mostRecentTimestamp = Math.max(mostRecentTimestamp, tr.lastModified);
|
||||
} catch (IOException iox) {
|
||||
// Broken file - zap it
|
||||
tile1.delete();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue