[Pkg-privacy-commits] [libgsecuredelete] 12/168: Added a cleanup() private method to be overriden by implementations.

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository libgsecuredelete.

commit 127c05387be26aaabe3d809be047d69f81f9ec15
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Tue Sep 29 23:54:49 2009 +0200

    Added a cleanup() private method to be overriden by implementations.
---
 gsecuredelete/async-operation.vala | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gsecuredelete/async-operation.vala b/gsecuredelete/async-operation.vala
index 0fe639a..7b4f19d 100644
--- a/gsecuredelete/async-operation.vala
+++ b/gsecuredelete/async-operation.vala
@@ -128,6 +128,14 @@ namespace SecureDelete
       return null;
     }
     
+    /* called after subprocess termination to cleanup anything that may be
+     * cleaned up (I think about some list of files that was just treated or so)
+     */
+    private virtual void cleanup ()
+    {
+      
+    }
+    
     /* returns the value at which the progress is full. When the progress reach
      * this value, it will be considered to be at 100% (even if it has no impact
      * other than reporting the current progress)
@@ -197,6 +205,7 @@ namespace SecureDelete
       if (finished) {
         this.finished (success, message);
         
+        this.cleanup ();
         Process.close_pid (this.pid);
         Posix.close (this.fd_err);
         Posix.close (this.fd_out);
@@ -326,6 +335,9 @@ namespace SecureDelete
           success = true;
         }
         this.finished (success, message);
+        this.cleanup ();
+        /* FIXME: if this prevent the rest of the function to be executed, the
+         * lock wouldn't be released */
         if (message != null) {
           throw new AsyncOperationError.CHILD_FAILED ("%s", message);
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git



More information about the Pkg-privacy-commits mailing list