[Pkg-privacy-commits] [libgsecuredelete] 54/168: Enhance count of files to work on
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Jul 7 20:06:39 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 4eac399013f66ccada1bcdf1e1b3f2466d79ea1e
Author: Colomban Wendling <ban at herbesfolles.org>
Date: Tue Feb 23 16:19:05 2010 +0100
Enhance count of files to work on
Don't count symlinks since srm doesn't report progress for them.
---
gsecuredelete/delete-operation.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gsecuredelete/delete-operation.vala b/gsecuredelete/delete-operation.vala
index ce91f1b..2877277 100644
--- a/gsecuredelete/delete-operation.vala
+++ b/gsecuredelete/delete-operation.vala
@@ -83,12 +83,14 @@ namespace Gsd
}
}
- /* Counts files (non-directories to be exact), starting from @path.
+ /* Counts regular files, starting from @path.
* Used to get the actual count of files we shall delete (and then the
* actual final progress) because srm reports the progress for each and
* every file it deletes, even if they was inside a directory we given.
* Note that there is no progress for directories at all, then skip them;
* just keep the files they holds.
+ * Finally, note that srm deletes only regular files (fails on hard links,
+ * renames soft links only, etc.).
*
* Even if somewhat overkill, it should not have (a too big) impact on speed
* since srm shall walk the directories anyway then we might have cached
@@ -108,8 +110,10 @@ namespace Gsd
}
} catch (FileError e) {
/* silently fail, doesn't matter. we just guess anyway */
- /*warning ("** %s\n", e.message);*/
+ /*warning ("** %s", e.message);*/
}
+ } else if (FileUtils.test (path, FileTest.IS_SYMLINK)) {
+ /* skip this one silently too */
} else {
n_files++;
}
--
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