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


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

The following commit has been merged in the master branch:
commit efc5a866530095887eb82100c1aae117f6d3dca7
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Tue Dec 5 16:18:41 2006 +0000

    Delete temporary file if user does not have write permissions. Completes fix for bug #497.
---
 src/basicio.cpp | 2 ++
 src/basicio.hpp | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/basicio.cpp b/src/basicio.cpp
index 504b66b..a93d440 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -223,6 +223,8 @@ namespace Exiv2 {
             fileIo->close();
             // Check if the file can be written to, if it already exists
             if (open("w+b") != 0) {
+                // Remove the (temporary) file 
+                std::remove(fileIo->path_.c_str());
                 throw Error(10, path_, "w+b", strError());
             }
             close();
diff --git a/src/basicio.hpp b/src/basicio.hpp
index 6f8627b..1e80279 100644
--- a/src/basicio.hpp
+++ b/src/basicio.hpp
@@ -391,6 +391,9 @@ namespace Exiv2 {
           method returns. This method exists primarily to be used with
           the BasicIo::temporary() method.
 
+          @note If the caller doesn't have permissions to write to the file,
+              an exception is raised and \em src is deleted.
+
           @param src Reference to another BasicIo instance. The entire contents
               of src are transferred to this object. The \em src object is
               invalidated by the method.

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list