[Scummvm-git-logs] scummvm master -> c33605e3c8e8ddaed783d8a0e4ef069f43cfb26a
bluegr
noreply at scummvm.org
Sun May 19 21:05:20 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7b0718c6ef ZVISION: Fix addDir after 2.9.0 path changes
c33605e3c8 ZVISION: Normalize path before adding to _dirList
Commit: 7b0718c6ef4b8d2280f57a59ce5669a11da2ad83
https://github.com/scummvm/scummvm/commit/7b0718c6ef4b8d2280f57a59ce5669a11da2ad83
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-05-20T00:05:16+03:00
Commit Message:
ZVISION: Fix addDir after 2.9.0 path changes
Also comparison is now ignoring case (uses equalsIgnoreCase)
This fix was required since, as reported in #15132, the subtitles addon (within a subfolder "Addon") would no longer work in ScummVM 2.9.0git. As far as I've tested, apart from the ignoreCase comparison, normalize() has to be applied at least on the iterator of the _dirList, since those paths end with a separator ("/").
Changed paths:
engines/zvision/file/search_manager.cpp
diff --git a/engines/zvision/file/search_manager.cpp b/engines/zvision/file/search_manager.cpp
index 915c1ca5695..0c08af1be49 100644
--- a/engines/zvision/file/search_manager.cpp
+++ b/engines/zvision/file/search_manager.cpp
@@ -176,8 +176,7 @@ bool SearchManager::loadZix(const Common::Path &name) {
Common::Path path_(path);
if (!path_.empty()) {
for (Common::List<Common::Path>::iterator it = _dirList.begin(); it != _dirList.end(); ++it) {
- // FIXME: ignoreCase
- if (path_ == *it) {
+ if (path_.equalsIgnoreCase(*it)) {
path_ = *it;
break;
}
@@ -215,8 +214,7 @@ bool SearchManager::loadZix(const Common::Path &name) {
void SearchManager::addDir(const Common::Path &name) {
Common::Path path;
for (Common::List<Common::Path>::iterator it = _dirList.begin(); it != _dirList.end(); ++it)
- // FIXME: ignore case
- if (name == *it) {
+ if (name.normalize().equalsIgnoreCase((*it).normalize())) {
path = *it;
break;
}
Commit: c33605e3c8e8ddaed783d8a0e4ef069f43cfb26a
https://github.com/scummvm/scummvm/commit/c33605e3c8e8ddaed783d8a0e4ef069f43cfb26a
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-05-20T00:05:16+03:00
Commit Message:
ZVISION: Normalize path before adding to _dirList
Changed paths:
engines/zvision/file/search_manager.cpp
diff --git a/engines/zvision/file/search_manager.cpp b/engines/zvision/file/search_manager.cpp
index 0c08af1be49..6fc7376a921 100644
--- a/engines/zvision/file/search_manager.cpp
+++ b/engines/zvision/file/search_manager.cpp
@@ -214,7 +214,7 @@ bool SearchManager::loadZix(const Common::Path &name) {
void SearchManager::addDir(const Common::Path &name) {
Common::Path path;
for (Common::List<Common::Path>::iterator it = _dirList.begin(); it != _dirList.end(); ++it)
- if (name.normalize().equalsIgnoreCase((*it).normalize())) {
+ if (name.equalsIgnoreCase(*it)) {
path = *it;
break;
}
@@ -256,7 +256,7 @@ void SearchManager::listDirRecursive(Common::List<Common::Path> &_list, const Co
Common::FSList fsList;
if (fsNode.getChildren(fsList)) {
- _list.push_back(fsNode.getPath());
+ _list.push_back(fsNode.getPath().normalize());
if (depth > 1)
for (Common::FSList::const_iterator it = fsList.begin(); it != fsList.end(); ++it)
More information about the Scummvm-git-logs
mailing list