From d994fae4ceb536f039cd449655fd824f038a4ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 1 Jan 2024 10:48:16 +0100 Subject: [PATCH] Fixed the change that has broken non-TAR maps Do not fail on the first image read error - there may be files with a "_%u_%u." file name match that are not image tiles. --- src/map/ozimap.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/map/ozimap.cpp b/src/map/ozimap.cpp index 68852f1a..88196db6 100644 --- a/src/map/ozimap.cpp +++ b/src/map/ozimap.cpp @@ -272,7 +272,7 @@ bool OziMap::setTileInfo(const QStringList &tiles, const QString &path) for (int i = 0; i < tiles.size(); i++) { const QString &tile = tiles.at(i); - if (tile.startsWith("set/") && tile.contains(rx)) { + if (tile.contains(rx)) { _tile.path = QString(tile).replace(rx, "_%1_%2."); if (_tar) { @@ -284,9 +284,8 @@ bool OziMap::setTileInfo(const QStringList &tiles, const QString &path) _tile.size = QImageReader(path + "/" + tile).size(); } if (!_tile.size.isValid()) { - _errorString = QString("Error retrieving tile size: " - "%1: Invalid image").arg(QFileInfo(tile).fileName()); - return false; + qWarning("%s: error reading tile image", qPrintable(tile)); + continue; } _map.path = QString();