summaryrefslogtreecommitdiff
path: root/SCP.pm
diff options
context:
space:
mode:
authorivan <ivan>2000-12-08 02:57:05 +0000
committerivan <ivan>2000-12-08 02:57:05 +0000
commitaa6d6c889e19664fd73daac1d60aeb544faf3015 (patch)
tree5519265faf24a99cc9d8707d92551ee429c449f2 /SCP.pm
parentd5f339d57b625382930c2b42f2304113da09ca5b (diff)
sub size: regex incorrectly assumes whitespace
Diffstat (limited to 'SCP.pm')
-rw-r--r--SCP.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/SCP.pm b/SCP.pm
index 6a25ccd..f0fd8ea 100644
--- a/SCP.pm
+++ b/SCP.pm
@@ -237,7 +237,7 @@ sub size {
0;
} else {
chomp( my $size = <$reader> || 0 );
- if ( $size =~ /^\s+(\d+)/ ) {
+ if ( $size =~ /^\s*(\d+)/ ) {
$1 ? $1 : '0e0';
} else {
$self->{errstr} = "unparsable output from remote wc: $size";
@@ -278,6 +278,8 @@ sub binary { 1; }
Ivan Kohler <ivan-netscp_pod@420.am>
Anthony Deaver <bishop@projectmagnus.org>
+Thanks to Jon Gunnip <jon@soundbite.com> for fixing a bug with size().
+
=head1 BUGS
Still has no-OO cruft.