SocialFlowDev / SocialFlow-S3

1 stars 0 forks source link

Warnings from uncat command. #1

Closed ashb closed 11 years ago

ashb commented 11 years ago

Fairly minor but the uncat command produces a few warnings.

If you use invalid creds (in this case creds that have been revoked, so I guess this is the same as giberish) you get this:

# tar -czP /home /home | sfs3 uncat -f /usr/local/etc/nfs_sfs3_cred.yml $(date --rfc-3339=date).tgz
Use of uninitialized value $part_len in addition (+) at /usr/local/share/perl/5.14.2/SocialFlow/S3.pm line 488.
403 Forbidden on GET /meta/2013-09-20.tgz/cryptokey at /usr/local/share/perl/5.14.2/Net/Async/Webservice/S3.pm line 351

If you use valid creds you get the warning coming up a few times:

# tar -czP /home /home | sfs3 uncat -f /usr/local/etc/nfs_sfs3_cred.yml $(date --rfc-3339=date).tgz
Use of uninitialized value $part_len in addition (+) at /usr/local/share/perl/5.14.2/SocialFlow/S3.pm line 488.
Use of uninitialized value $part_len in addition (+) at /usr/local/share/perl/5.14.2/SocialFlow/S3.pm line 488.
Use of uninitialized value $part_len in addition (+) at /usr/local/share/perl/5.14.2/SocialFlow/S3.pm line 488.
Use of uninitialized value $part_len in addition (+) at /usr/local/share/perl/5.14.2/SocialFlow/S3.pm line 488.
leonerd commented 11 years ago

Huhh... this is kindof worrying in a way. :/

487 my ( $part, $part_len ) = $gen_parts->() or return; 488 my $part_start = $part_offset;

Means it must have generated a part, with undefined length.

leonerd commented 11 years ago

Oh I see.. Turns out that these values are only used for building the progress counter, which isn't used by uncat. Hmm, I wonder if it should still display an upload rate meter anyway, even though it can't display an ETA.

leonerd commented 11 years ago

Fixed