Changeset 240

Show
Ignore:
Timestamp:
02/17/08 01:08:53 (9 months ago)
Author:
mbr
Message:

- Bugfix to not include previously encrypted files (i.e. those with a .gpg
extension) in the encryption/decryption file list. This bug was
introduced in gpgdir-1.5 when a change was made to ignore ascii-armored
files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gpgdir/trunk/ChangeLog

    r237 r240  
     1gpgdir-1.6 (02//2008): 
     2    - Bugfix to not include previously encrypted files (i.e. those with a .gpg 
     3      extension) in the encryption/decryption file list.  This bug was 
     4      introduced in gpgdir-1.5 when a change was made to ignore ascii-armored 
     5      files. 
     6    - Added added LC_ALL=C locale setting for the install.pl script (this 
     7      should help to ensure gpgdir is properly installed on most systems). Two 
     8      new command line arguments --LC_ALL and --no-LC_ALL also allow the 
     9      locale setting to be changed or not used at all. 
     10    - Added --Exclude-mod-regex option to the install.pl script so that it is 
     11      possible to force the exclusion of perl modules that gpgdir would 
     12      normally install. This is useful for ensuring that gpgdir references 
     13      perl modules that are already installed in the system perl library tree 
     14      instead of using those that are installed in /usr/lib/gpgdir. 
     15    - Updated to display command line usage warnings without automatically 
     16      displaying the entire usage() page (which is quite long). 
     17 
    118gpgdir-1.5 (08/31/2007): 
    219    - Added the --Symmetric option so that files can be encrypted/decrypted 
  • gpgdir/trunk/gpgdir

    r236 r240  
    116116Getopt::Long::Configure('no_ignore_case'); 
    117117 
    118 &usage_and_exit() unless(GetOptions ( 
     118die "[-] Use --help for usage information.\n" unless(GetOptions ( 
    119119    'encrypt=s'      => \$encrypt_dir,     # Encrypt files in this directory. 
    120120    'decrypt=s'      => \$decrypt_dir,     # Decrypt files in this directory. 
     
    976976    ### skip all links, zero size files, all hidden 
    977977    ### files (includes .gnupg files), etc. 
    978     if (-d $file) { 
    979         return; 
    980     } 
     978    return if -d $file; 
    981979    if (-e $file and not -l $file and -s $file != 0 
    982980            and $file !~ m|/\.|) { 
    983         if ($encrypt_mode) { 
    984             if ($file =~ m|\.gpg| and $file =~ m|\.asc|) { 
     981        if ($file =~ m|\.gpg| or $file =~ m|\.asc|) { 
     982            if ($encrypt_mode) { 
    985983                print "[-] Skipping encrypted file: $file\n" unless $quiet; 
    986                 return; 
    987             } 
    988         } else { 
    989             if ($file !~ m|\.gpg| and $file !~ m|\.asc|) { 
     984            } else { 
    990985                print "[-] Skipping unencrypted file: $file\n" unless $quiet; 
    991                 return; 
    992             } 
    993         } 
     986            } 
     987            return; 
     988        }  
    994989        my ($atime, $mtime) = (stat($file))[8,9]; 
    995990        $files{$file}{'atime'} = $atime;