Skip to content

Commit 02ce7e9

Browse files
Restore modified tags after TZ manipulation
This ensures that Xmp date/times that have been set by the user aren't over written by the TZ restoration efforts. This fixes bug #1998
1 parent fde8ed0 commit 02ce7e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/xmpsidecar.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ namespace Exiv2 {
144144
copyExifToXmp(exifData_, xmpData_);
145145
copyIptcToXmp(iptcData_, xmpData_);
146146

147-
// #589 - restore tags which were modified by the convertors
148-
for (auto&& it : copy) {
149-
xmpData_[it.key()] = it.value();
150-
}
151-
152147
// #1112 - restore dates if they lost their TZ info
153148
for (auto&& date : dates_) {
154149
std::string sKey = date.first;
@@ -163,6 +158,11 @@ namespace Exiv2 {
163158
}
164159
}
165160

161+
// #589 - restore tags which were modified by the convertors
162+
for (auto&& it : copy) {
163+
xmpData_[it.key()] = it.value();
164+
}
165+
166166
if (XmpParser::encode(xmpPacket_, xmpData_,
167167
XmpParser::omitPacketWrapper|XmpParser::useCompactFormat) > 1) {
168168
#ifndef SUPPRESS_WARNINGS

0 commit comments

Comments
 (0)