Changeset 15029
- Timestamp:
- Sep 25, 2007, 5:41:00 PM (19 years ago)
- Location:
- trunk/DataStore
- Files:
-
- 2 edited
-
lib/DataStore/File/Parser.pm (modified) (3 diffs)
-
scripts/dsfilesetls (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/lib/DataStore/File/Parser.pm
r15027 r15029 1 1 # Copyright (C) 2006 Joshua Hoblitt 2 2 # 3 # $Id: Parser.pm,v 1.1 4 2007-09-26 00:44:43jhoblitt Exp $3 # $Id: Parser.pm,v 1.15 2007-09-26 03:41:00 jhoblitt Exp $ 4 4 5 5 package DataStore::File::Parser; … … 185 185 # validate format of md5sum, hex encoded 186 186 unless ($md5sum =~ $MD5_FIELD) { 187 carp "line $lineno: field $md5sum:" 188 . " does not conform to $MD5_FIELD: $line"; 189 next LINE; 187 # allow md5sum to be empty 188 unless ($md5sum =~ /^\s*$/) { 189 carp "line $lineno: field $md5sum:" 190 . " does not conform to $MD5_FIELD: $line"; 191 next LINE; 192 } 193 $md5sum = undef; 190 194 } 191 195 … … 197 201 my @extra = @fields[4 .. $#fields] if $#fields >= 4; 198 202 199 # fifo 200 push @data, DataStore::File->new({ 203 my %p = ( 201 204 fileid => $fileid, 202 205 bytes => $bytes, 203 md5sum => $md5sum,204 206 type => $type, 205 207 extra => \@extra, 206 208 uri => $self->base_uri . $fileid, 207 }); 209 ); 210 $p{md5sum} = $md5sum if $md5sum; 211 212 # fifo 213 push @data, DataStore::File->new(%p); 208 214 } continue { 209 215 $lineno++; -
trunk/DataStore/scripts/dsfilesetls
r10249 r15029 3 3 # Copyright (C) 2006 Joshua Hoblitt 4 4 # 5 # $Id: dsfilesetls,v 1. 4 2006-11-29 01:26:57jhoblitt Exp $5 # $Id: dsfilesetls,v 1.5 2007-09-26 03:41:00 jhoblitt Exp $ 6 6 7 7 use strict; … … 48 48 $fs->fileid, " ", 49 49 $fs->bytes, " ", 50 $fs->md5sum , " ",50 $fs->md5sum || 0, " ", 51 51 $fs->type; 52 52 print " ", join(" ", @{$fs->extra}) if defined $fs->extra;
Note:
See TracChangeset
for help on using the changeset viewer.
