#
# Author: Michael Rash (mbr@cipherdyne.com)
#
-# Version: 1.9.3
+# Version: 1.9.4
#
# Copyright (C) 2002-2008 Michael Rash (mbr@cipherdyne.org)
#
#
###########################################################################
#
-# $Id: gpgdir 328 2008-11-05 05:04:20Z mbr $
+# $Id: gpgdir 335 2009-02-13 04:48:54Z mbr $
#
use File::Find;
use strict;
### set the current gpgdir version and file revision numbers
-my $version = '1.9.3';
-my $revision_svn = '$Revision: 328 $';
+my $version = '1.9.4';
+my $revision_svn = '$Revision: 335 $';
my $rev_num = '1';
($rev_num) = $revision_svn =~ m|\$Rev.*:\s+(\S+)|;
$cmd .= ' -f -s ';
}
}
- $cmd .= $file;
+ $cmd .= qq|"$file"|;
if ($verbose) {
print " Executing: $cmd\n";
}
sub check_file_criteria() {
my $file = shift;
### skip all links, zero size files, all hidden
- ### files (includes .gnupg files), etc.
+ ### files (includes the .gnupg directory), etc.
return if -d $file;
+
+ unless ($force_mode) {
+ if ($file =~ m|/\.|) {
+ print "[-] Skipping file: $file\n"
+ if $verbose and not $quiet;
+ return;
+ }
+ }
+
if (-e $file and not -l $file and -s $file != 0
- and $file !~ m|/\.|) {
+ and $file !~ m|\.gpgdir\.pid| and $file !~ m|\.gnupg|) {
if ($encrypt_mode or $signing_mode) {
if ($file =~ m|\.gpg| or $file =~ m|\.asc|) {
print "[-] Skipping encrypted/signed file: $file\n" unless $quiet;