X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=gpgdir%2Fgpgdir;fp=gpgdir%2Fgpgdir;h=947d3c7034730c5ef2a69465e8ab9ea4e4fa44f6;hb=63a090985f89ef947c524272a003bfafd9b1ddc7;hp=0075215e9cabcbeabfab826d3f6fc8d076da3a1c;hpb=b0438569dd9a7578dcc36df14079b142f717d6b1;p=pgp-tools.git diff --git a/gpgdir/gpgdir b/gpgdir/gpgdir index 0075215..947d3c7 100755 --- a/gpgdir/gpgdir +++ b/gpgdir/gpgdir @@ -10,7 +10,7 @@ # # Author: Michael Rash (mbr@cipherdyne.com) # -# Version: 1.9.3 +# Version: 1.9.4 # # Copyright (C) 2002-2008 Michael Rash (mbr@cipherdyne.org) # @@ -28,7 +28,7 @@ # ########################################################################### # -# $Id: gpgdir 328 2008-11-05 05:04:20Z mbr $ +# $Id: gpgdir 335 2009-02-13 04:48:54Z mbr $ # use File::Find; @@ -40,8 +40,8 @@ use Cwd; 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+)|; @@ -666,7 +666,7 @@ sub delete_file() { $cmd .= ' -f -s '; } } - $cmd .= $file; + $cmd .= qq|"$file"|; if ($verbose) { print " Executing: $cmd\n"; } @@ -1166,10 +1166,19 @@ sub find_files() { 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;