From: Jay Freeman (saurik) Date: Sun, 12 Mar 2017 11:19:48 +0000 (-0700) Subject: Avoid duplicate Find when remapped during iterate. X-Git-Tag: v2.1.0~25 X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/66f2305d57b04ba04018f98f91494cd4dabd1249 Avoid duplicate Find when remapped during iterate. --- diff --git a/ldid.cpp b/ldid.cpp index aefe792..2b755f4 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -1888,14 +1888,6 @@ void UnionFolder::Open(const std::string &path, const Functor &code, const Functor &)> &link) const { - parent_.Find(path, fun([&](const std::string &name) { - if (deletes_.find(path + name) == deletes_.end()) - code(name); - }), fun([&](const std::string &name, const Functor &read) { - if (deletes_.find(path + name) == deletes_.end()) - link(name, read); - })); - for (auto &reset : resets_) Map(path, code, reset.first, fun([&](const Functor &code) { auto &entry(reset.second); @@ -1909,6 +1901,14 @@ void UnionFolder::Find(const std::string &path, const Functor &read) { + if (deletes_.find(path + name) == deletes_.end()) + link(name, read); + })); } #ifndef LDID_NOTOOLS