[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:36:17 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=83fa163
The following commit has been merged in the master branch:
commit 83fa163ff44ed436eb5feb265d9cc00bae485a80
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat May 8 06:58:36 2004 +0000
Minor (cnsistency) fixes
---
src/actions.cpp | 50 +++++++++++++++++++++++++++++++-------------------
1 file changed, 31 insertions(+), 19 deletions(-)
diff --git a/src/actions.cpp b/src/actions.cpp
index efa0785..e4dded4 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -20,13 +20,13 @@
*/
/*
File: actions.cpp
- Version: $Name: $ $Revision: 1.19 $
+ Version: $Name: $ $Revision: 1.20 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 08-Dec-03, ahu: created
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.19 $ $RCSfile: actions.cpp,v $")
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.20 $ $RCSfile: actions.cpp,v $")
// *****************************************************************************
// included header files
@@ -553,13 +553,22 @@ namespace Action {
int Erase::eraseThumbnail(Exif::ExifData& exifData) const
{
- long delta = exifData.eraseThumbnail();
- if (Params::instance().verbose_) {
- std::cout << "Erasing " << delta << " Bytes of thumbnail data
";
+ int rc = 0;
+ std::string thumbExt = exifData.thumbnailExtension();
+ if (thumbExt.empty()) {
+ if (Params::instance().verbose_) {
+ std::cout << "Image does not contain an Exif thumbnail
";
+ }
}
- int rc = exifData.write(path_);
- if (rc) {
- std::cerr << exifWriteError(rc, path_) << "
";
+ else {
+ long delta = exifData.eraseThumbnail();
+ if (Params::instance().verbose_) {
+ std::cout << "Erasing " << delta << " Bytes of thumbnail data
";
+ }
+ rc = exifData.write(path_);
+ if (rc) {
+ std::cerr << exifWriteError(rc, path_) << "
";
+ }
}
return rc;
}
@@ -633,8 +642,8 @@ namespace Action {
{
std::string thumb = Util::dirname(path_) + "/"
+ Util::basename(path_, true) + "-thumb";
+ std::string thumbExt = exifData.thumbnailExtension();
if (Params::instance().verbose_) {
- std::string thumbExt = exifData.thumbnailExtension();
if (thumbExt.empty()) {
std::cout << "Image does not contain an Exif thumbnail
";
}
@@ -645,16 +654,19 @@ namespace Action {
<< thumb << thumbExt << "
";
}
}
- if (!Params::instance().force_ && Util::fileExists(thumb)) {
- std::cout << Params::instance().progname()
- << ": Overwrite `" << thumb << "'? ";
- std::string s;
- std::cin >> s;
- if (s[0] != 'y' && s[0] != 'Y') return 0;
- }
- int rc = exifData.writeThumbnail(thumb);
- if (rc) {
- std::cerr << exifWriteError(rc, thumb) << "
";
+ int rc = 0;
+ if (!thumbExt.empty()) {
+ if (!Params::instance().force_ && Util::fileExists(thumb + thumbExt)) {
+ std::cout << Params::instance().progname()
+ << ": Overwrite `" << thumb + thumbExt << "'? ";
+ std::string s;
+ std::cin >> s;
+ if (s[0] != 'y' && s[0] != 'Y') return 0;
+ }
+ rc = exifData.writeThumbnail(thumb);
+ if (rc) {
+ std::cerr << exifWriteError(rc, thumb) << "
";
+ }
}
return rc;
}
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list