Skip to content

Commit

Permalink
Fix issue osmdroid#2012
Browse files Browse the repository at this point in the history
  • Loading branch information
emandtf committed Jul 12, 2024
1 parent d27789e commit bc1b40e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ public boolean forceLoadTile(final OnlineTileSourceBase tileSource, final long p
}
}

/** Returns <i>TRUE</i> if deletion was not possible */
private boolean deleteTileError(final long pMapTileIndex) {
return this.checkTile(pMapTileIndex) && !mTileWriter.remove(mTileSource, pMapTileIndex);
}
public boolean deleteTile(final long pMapTileIndex) {
return mTileWriter.exists(mTileSource, pMapTileIndex) && mTileWriter.remove(mTileSource, pMapTileIndex);
return !this.checkTile(pMapTileIndex) || mTileWriter.remove(mTileSource, pMapTileIndex);
}

public boolean checkTile(final long pMapTileIndex) {
Expand Down Expand Up @@ -930,7 +934,7 @@ public int getProgressModulo() {

@Override
public boolean tileAction(final long pMapTileIndex) {
return deleteTile(pMapTileIndex);
return deleteTileError(pMapTileIndex);
}
};
}
Expand Down

0 comments on commit bc1b40e

Please sign in to comment.