diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 1583b66..9d0b169 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -1307,8 +1307,13 @@ void Gallery::init() { if (file.exists() && file.contains("append")) { - TemplateList data = this->read(); - this->writeBlock(data); + File rFile = file; + rFile.remove("append"); + Gallery *reader = Gallery::make(rFile); + TemplateList data = reader->read(); + delete reader; + + writeBlock(data); } } diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index ef09714..5036aec 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -766,8 +766,11 @@ class memGallery : public Gallery BR_REGISTER(Gallery, memGallery) -FileList FileList::fromGallery(const File &file, bool cache) +FileList FileList::fromGallery(const File &rFile, bool cache) { + File file = rFile; + file.remove("append"); + File targetMeta = file; targetMeta.name = targetMeta.path() + targetMeta.baseName() + "_meta" + targetMeta.hash() + ".mem"; diff --git a/openbr/plugins/misc.cpp b/openbr/plugins/misc.cpp index a9776ca..71d94b2 100644 --- a/openbr/plugins/misc.cpp +++ b/openbr/plugins/misc.cpp @@ -981,7 +981,10 @@ class FileExclusionTransform : public UntrainableMetaTransform { if (exclusionGallery.isEmpty()) return; - FileList temp = FileList::fromGallery(exclusionGallery); + File rFile(exclusionGallery); + rFile.remove("append"); + + FileList temp = FileList::fromGallery(rFile); excluded = QSet::fromList(temp.names()); } };