metadata: do not exclude tags that were explicitly selected by the user
(cherry picked from commit 60d862fa72046ecf8f44c2a1677f72237e86e838)
This commit is contained in:
parent
ba79d8b7f0
commit
939315f67b
@ -363,9 +363,10 @@ void Exiv2Metadata::remove_unwanted(Exiv2::ExifData &dst) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto it = dst.begin(); it != dst.end(); ) {
|
for (auto it = dst.begin(); it != dst.end(); ) {
|
||||||
if (badtags.find(it->key()) != badtags.end()) {
|
int relevant = exif_keys_ ? (exif_keys_->find(it->key()) != exif_keys_->end() ? 1 : 0) : -1;
|
||||||
|
if (badtags.find(it->key()) != badtags.end() && relevant != 1) {
|
||||||
it = dst.erase(it);
|
it = dst.erase(it);
|
||||||
} else if (exif_keys_ && exif_keys_->find(it->key()) == exif_keys_->end()) {
|
} else if (relevant == 0) {
|
||||||
it = dst.erase(it);
|
it = dst.erase(it);
|
||||||
} else {
|
} else {
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user