[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:38:22 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=623f52e
The following commit has been merged in the master branch:
commit 623f52e185e55e4a0700eebc6aefce8935ba9656
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Thu Mar 15 23:16:06 2007 +0000
Fixed handling of multiple rename options -r, -t, -T
---
src/exiv2.cpp | 11 +++++++++--
src/exiv2.hpp | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/exiv2.cpp b/src/exiv2.cpp
index beac204..ba4169b 100644
--- a/src/exiv2.cpp
+++ b/src/exiv2.cpp
@@ -334,16 +334,23 @@ int Params::evalRename(int opt, const std::string& optarg)
case Action::none:
action_ = Action::rename;
switch (opt) {
- case 'r': format_ = optarg; break;
+ case 'r':
+ format_ = optarg;
+ formatSet_ = true;
+ break;
case 't': timestamp_ = true; break;
case 'T': timestampOnly_ = true; break;
}
break;
case Action::rename:
- if (opt == 'r' && !format_.empty()) {
+ if (opt == 'r' && (formatSet_ || timestampOnly_)) {
std::cerr << progname()
<< ": " << _("Ignoring surplus option") << " -r \"" << optarg << "\"
";
}
+ else {
+ format_ = optarg;
+ formatSet_ = true;
+ }
break;
default:
std::cerr << progname()
diff --git a/src/exiv2.hpp b/src/exiv2.hpp
index 89ab9b8..283f950 100644
--- a/src/exiv2.hpp
+++ b/src/exiv2.hpp
@@ -164,6 +164,7 @@ public:
long adjustment_; //!< Adjustment in seconds.
std::string format_; //!< Filename format (-r option arg).
+ bool formatSet_; //!< Whether the format is set with -r
CmdFiles cmdFiles_; //!< Names of the modification command files
CmdLines cmdLines_; //!< Commands from the command line
ModifyCmds modifyCmds_; //!< Parsed modification commands
@@ -195,6 +196,7 @@ private:
target_(ctExif|ctIptc|ctComment),
adjustment_(0),
format_("%Y%m%d_%H%M%S"),
+ formatSet_(false),
first_(true) {}
//! Prevent copy-construction: not implemented.
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list