From 66f2305d57b04ba04018f98f91494cd4dabd1249 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 12 Mar 2017 04:19:48 -0700 Subject: [PATCH] Avoid duplicate Find when remapped during iterate. --- ldid.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 -- 2.45.2