[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:16 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=226fafe

The following commit has been merged in the master branch:
commit 226fafe3f603416b2758e6d6af77038ca6679542
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Fri Apr 30 09:12:14 2004 +0000

    Implemented Filesize (finally)
---
 src/actions.cpp | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/actions.cpp b/src/actions.cpp
index 9fa7bcf..eb00daf 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      actions.cpp
-  Version:   $Name:  $ $Revision: 1.17 $
+  Version:   $Name:  $ $Revision: 1.18 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   08-Dec-03, ahu: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.17 $ $RCSfile: actions.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.18 $ $RCSfile: actions.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -47,6 +47,9 @@ EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.17 $ $RCSfile: actions.cpp,v $")
 #include <cstdio>
 #include <ctime>
 #include <cmath>
+#include <sys/types.h>                  // for stat()
+#include <sys/stat.h>                   // for stat()
+#include <unistd.h>                     // for stat()
 
 // *****************************************************************************
 // local declarations
@@ -151,9 +154,12 @@ namespace Action {
         std::cout << std::setw(align_) << std::setfill(' ') << std::left
                   << "Filename" << ": " << path_ << "
";
 
-        // Todo: Filesize
-        std::cout << std::setw(align_) << std::setfill(' ') << std::left
-                  << "Filesize" << ": " << "
";
+        // Filesize
+        struct stat buf;
+        if (0 == stat(path_.c_str(), &buf)) {
+            std::cout << std::setw(align_) << std::setfill(' ') << std::left
+                      << "Filesize" << ": " << buf.st_size << " Bytes
";
+        }
 
         // Camera make
         printTag(exifData, "Image.OtherTags.Make", "Camera make");

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list