[Pkg-privacy-commits] [libgsecuredelete] 19/168: Added paths as a public gettable property.

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:33 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 050d1f82e1351370c15507eccd15176ecf8efb86
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Wed Sep 30 19:41:28 2009 +0200

    Added paths as a public gettable property.
    
    Added DeleteOperation:paths allowing to get the current list of paths
    to delete.
---
 gsecuredelete/delete-operation.vala | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/gsecuredelete/delete-operation.vala b/gsecuredelete/delete-operation.vala
index 057b2ca..0bebee5 100644
--- a/gsecuredelete/delete-operation.vala
+++ b/gsecuredelete/delete-operation.vala
@@ -23,7 +23,7 @@ namespace SecureDelete
 {
   public class DeleteOperation : SecureDeleteOperation
   {
-    private List<string>  paths;
+    private List<string>  _paths;
     private uint          n_files = 0;
     
     /* properties */
@@ -31,12 +31,18 @@ namespace SecureDelete
     public bool fast {
       get; set; default = false;
     }
+    /* list of files */
+    public List<string> paths {
+      get {
+        return this._paths;
+      }
+    }
     
     /* adds a path to the list of paths to remove */
     public void add_path (string path)
       requires (! this.busy)
     {
-      this.paths.append (path);
+      this._paths.append (path);
     }
     
     /* removes a path from the list of paths to remove */
@@ -47,12 +53,12 @@ namespace SecureDelete
        * (e.g. /aa/../bb is the same as /bb) */
       weak List<string> link;
       
-      link = this.paths.find_custom (path,
-                                     (a, b) => {
-                                       return (string)a == (string)b ? 0 : 1;
-                                     });
+      link = this._paths.find_custom (path,
+                                      (a, b) => {
+                                        return (string)a == (string)b ? 0 : 1;
+                                      });
       if (link != null) {
-        this.paths.delete_link (link);
+        this._paths.delete_link (link);
       }
     }
     
@@ -69,7 +75,7 @@ namespace SecureDelete
         args += "-f";
       }
       this.n_files = 0;
-      foreach (string path in this.paths) {
+      foreach (string path in this._paths) {
         args += path;
         this.n_files++;
       }
@@ -85,7 +91,7 @@ namespace SecureDelete
     protected override void cleanup ()
     {
       /* empty the paths' list not to try to remove them again at next call */
-      this.paths = null;
+      this._paths = null;
     }
     
     protected override uint get_max_progress ()

-- 
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