=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/NewTorrents.pl,v retrieving revision 1.10 retrieving revision 1.12 diff -u -r1.10 -r1.12 --- openbsd/OpenBSDTorrents/NewTorrents.pl 2006/07/24 19:03:53 1.10 +++ openbsd/OpenBSDTorrents/NewTorrents.pl 2007/10/01 21:17:23 1.12 @@ -1,5 +1,5 @@ #!/usr/bin/perl -T -#$RedRiver: NewTorrents.pl,v 1.9 2006/05/15 18:47:04 andrew Exp $ +#$RedRiver: NewTorrents.pl,v 1.11 2007/02/07 23:09:05 andrew Exp $ use strict; use warnings; use diagnostics; @@ -15,15 +15,14 @@ %ENV = (); -use YAML; - - my $last_dir = ''; while (<>) { + print; chomp; - print $_, "\n"; - if (my ($message, $file) = m#(.*)\s+\`([^']+)'#) { + if (my ($message, $file, $xfer, $size) = + m#(.*)\s+\`([^']+)'\s+(\d+)\s+(\d+)#) { next if $message eq 'Making directory'; + next unless $xfer; my $dir = ''; if ($file =~ m#^(.*)/([^/]+)#) { @@ -58,6 +57,7 @@ { my $dir = shift; return undef unless $dir; + $dir =~ s/^.*$OBT->{BASENAME}\///; my $should_fork = 1;