mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-11-28 20:32:06 +00:00
pass entries as references
pass entries as references
This commit is contained in:
parent
459d1176b3
commit
f999575e4f
1 changed files with 4 additions and 4 deletions
|
@ -35,8 +35,8 @@ void extract(const std::string& filename, const std::string& workingPath, int o
|
|||
ProgressEvent::instance().setTotalSteps(entries.size() + 1);
|
||||
for (const auto& entry : entries) {
|
||||
if((overwriteInis == 0 && entry.name.substr(entry.name.length() - 4) == ".ini")
|
||||
|| find_if(ignoreList.begin(), ignoreList.end(), [entry](std::string ignoreList) {
|
||||
u8 res = ("/" + entry.name).find(ignoreList);
|
||||
|| find_if(ignoreList.begin(), ignoreList.end(), [&entry](std::string ignored) {
|
||||
u8 res = ("/" + entry.name).find(ignored);
|
||||
return (res == 0 || res == 1); }) != ignoreList.end())
|
||||
{
|
||||
if(!std::filesystem::exists("/" + entry.name)) {
|
||||
|
@ -69,8 +69,8 @@ void extract(const std::string& filename, const std::string& workingPath, const
|
|||
std::vector<zipper::ZipEntry> entries = unzipper.entries();
|
||||
ProgressEvent::instance().setTotalSteps(entries.size() + 1);
|
||||
for (const auto& entry : entries) {
|
||||
if(find_if(ignoreList.begin(), ignoreList.end(), [entry](std::string ignoreList) {
|
||||
u8 res = ("/" + entry.name).find(ignoreList);
|
||||
if(find_if(ignoreList.begin(), ignoreList.end(), [&entry](std::string ignored) {
|
||||
u8 res = ("/" + entry.name).find(ignored);
|
||||
return (res == 0 || res == 1); }) != ignoreList.end())
|
||||
{
|
||||
if(!std::filesystem::exists("/" + entry.name)){
|
||||
|
|
Loading…
Reference in a new issue