yet another symlink bug spotted by Henk P. Penning
authorAndreas J. Koenig <andk@cpan.org>
Sat, 4 Jun 2011 11:29:50 +0000 (4 13:29 +0200)
committerAndreas J. Koenig <andk@cpan.org>
Sat, 4 Jun 2011 11:29:50 +0000 (4 13:29 +0200)
lib/File/Rsync/Mirror/Recentfile.pm

index 8e4044b..9a29c7e 100644 (file)
@@ -1184,9 +1184,10 @@ sub _mirror_item {
         if ($options->{'skip-deletes'}) {
             $activity = "skipped";
         } else {
-            if (! -e $dst) {
+            my @lstat = lstat $dst;
+            if (! -e _) {
                 $activity = "not_found";
-            } elsif (-l $dst or not -d _) {
+            } elsif (-l _ or not -d _) {
                 $self->delayed_operations->{unlink}{$dst}++;
                 $activity = "deleted";
             } else {