Commit db273407f0b441f2c6a45c2168bfadfb419d23e3
Merge branch 'master' of https://github.com/biometrics/openbr
Showing
3 changed files
with
15 additions
and
4 deletions
openbr/openbr_plugin.cpp
| ... | ... | @@ -1307,8 +1307,13 @@ void Gallery::init() |
| 1307 | 1307 | { |
| 1308 | 1308 | if (file.exists() && file.contains("append")) |
| 1309 | 1309 | { |
| 1310 | - TemplateList data = this->read(); | |
| 1311 | - this->writeBlock(data); | |
| 1310 | + File rFile = file; | |
| 1311 | + rFile.remove("append"); | |
| 1312 | + Gallery *reader = Gallery::make(rFile); | |
| 1313 | + TemplateList data = reader->read(); | |
| 1314 | + delete reader; | |
| 1315 | + | |
| 1316 | + writeBlock(data); | |
| 1312 | 1317 | } |
| 1313 | 1318 | } |
| 1314 | 1319 | ... | ... |
openbr/plugins/gallery.cpp
| ... | ... | @@ -766,8 +766,11 @@ class memGallery : public Gallery |
| 766 | 766 | |
| 767 | 767 | BR_REGISTER(Gallery, memGallery) |
| 768 | 768 | |
| 769 | -FileList FileList::fromGallery(const File &file, bool cache) | |
| 769 | +FileList FileList::fromGallery(const File &rFile, bool cache) | |
| 770 | 770 | { |
| 771 | + File file = rFile; | |
| 772 | + file.remove("append"); | |
| 773 | + | |
| 771 | 774 | File targetMeta = file; |
| 772 | 775 | targetMeta.name = targetMeta.path() + targetMeta.baseName() + "_meta" + targetMeta.hash() + ".mem"; |
| 773 | 776 | ... | ... |
openbr/plugins/misc.cpp
| ... | ... | @@ -981,7 +981,10 @@ class FileExclusionTransform : public UntrainableMetaTransform |
| 981 | 981 | { |
| 982 | 982 | if (exclusionGallery.isEmpty()) |
| 983 | 983 | return; |
| 984 | - FileList temp = FileList::fromGallery(exclusionGallery); | |
| 984 | + File rFile(exclusionGallery); | |
| 985 | + rFile.remove("append"); | |
| 986 | + | |
| 987 | + FileList temp = FileList::fromGallery(rFile); | |
| 985 | 988 | excluded = QSet<QString>::fromList(temp.names()); |
| 986 | 989 | } |
| 987 | 990 | }; | ... | ... |