Ticket #2910: enter into symlink to commpressed patch shows empty patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-10-02 18:25:22 +04:00
parent 9b99f5b659
commit 9af54886d6

View File

@ -380,25 +380,31 @@ sub copyin($$$) {
or error "Can't write to archive"; or error "Can't write to archive";
} }
my $fin = $ARGV[1];
# resolve symlink
while (-l $fin) {
$fin = readlink $fin;
}
if ($ARGV[0] eq 'list') { if ($ARGV[0] eq 'list') {
open I, myin($ARGV[1]).'|'; open I, myin($fin).'|';
list ($ARGV[1]); list ($fin);
exit 0; exit 0;
} elsif ($ARGV[0] eq 'copyout') { } elsif ($ARGV[0] eq 'copyout') {
open I, myin($ARGV[1])."|"; open I, myin($fin)."|";
copyout ($ARGV[2], $ARGV[3]); copyout ($ARGV[2], $ARGV[3]);
exit 0; exit 0;
} elsif ($ARGV[0] eq 'rm') { } elsif ($ARGV[0] eq 'rm') {
open I, myin($ARGV[1])."|"; open I, myin($fin)."|";
rm ($ARGV[1], $ARGV[2]); rm ($fin, $ARGV[2]);
exit 0; exit 0;
} elsif ($ARGV[0] eq 'rmdir') { } elsif ($ARGV[0] eq 'rmdir') {
exit 0; exit 0;
} elsif ($ARGV[0] eq 'mkdir') { } elsif ($ARGV[0] eq 'mkdir') {
exit 0; exit 0;
} elsif ($ARGV[0] eq 'copyin') { } elsif ($ARGV[0] eq 'copyin') {
copyin ($ARGV[1], $ARGV[2], $ARGV[3]); copyin ($fin, $ARGV[2], $ARGV[3]);
exit 0; exit 0;
} }
exit 1; exit 1;