[Pgp-tools-commit] r768 - trunk/caff

Guilhem Moulin guilhem-guest at moszumanska.debian.org
Thu Feb 12 18:09:57 UTC 2015


Author: guilhem-guest
Date: 2015-02-12 18:09:57 +0000 (Thu, 12 Feb 2015)
New Revision: 768

Modified:
   trunk/caff/caff
Log:
Don't override existing symlinks to a non-existent target.

Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff	2015-01-27 18:34:21 UTC (rev 767)
+++ trunk/caff/caff	2015-02-12 18:09:57 UTC (rev 768)
@@ -596,7 +596,7 @@
 		foreach my $sec (qw/secring.gpg private-keys-v1.d/) {
 			my $osec = ($ENV{'GNUPGHOME'} || "$ENV{'HOME'}/.gnupg") .'/'. $sec;
 			my $nsec = $CONFIG{'caffhome'}.'/gnupghome/'.$sec;
-			unless (-e $nsec) {
+			unless (-e $nsec or -l $nsec) {
 				info ("Creating symlink $nsec to $osec.");
 				symlink $osec, $nsec or die "Cannot create symlink: $!\n";
 			}




More information about the Pgp-tools-commit mailing list