projects
/
Net-SCP.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d5f339d
)
sub size: regex incorrectly assumes whitespace
author
ivan
<ivan>
Fri, 8 Dec 2000 02:57:05 +0000
(
02:57
+0000)
committer
ivan
<ivan>
Fri, 8 Dec 2000 02:57:05 +0000
(
02:57
+0000)
SCP.pm
patch
|
blob
|
history
diff --git
a/SCP.pm
b/SCP.pm
index
6a25ccd
..
f0fd8ea
100644
(file)
--- a/
SCP.pm
+++ b/
SCP.pm
@@
-237,7
+237,7
@@
sub size {
0;
} else {
chomp( my $size = <$reader> || 0 );
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";
$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>
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.
=head1 BUGS
Still has no-OO cruft.