Changeset 20220
- Timestamp:
- Oct 17, 2008, 9:40:59 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_get_image_job.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_get_image_job.pl
r18543 r20220 106 106 my $pathname = shift @fields; 107 107 my $filetype = shift @fields; 108 my $class_id = shift @fields; 108 109 109 110 ($pathname , my $filename) = resolvepath($pathname); … … 121 122 122 123 # XXX is pstamp always the right file type, if not where can we get the right one? 123 print REGLIST file_registration_line($filename, $dest_path, $filetype );124 print REGLIST file_registration_line($filename, $dest_path, $filetype, $class_id); 124 125 125 126 foreach my $f (@fields) { … … 136 137 my $pathname = $_[0]; 137 138 139 # use the basename of the unresolved file as the name of the file 140 # in order to avoid nebulous name mangled paths in the datastore 141 my $file = basename($pathname); 142 138 143 my $slash = index($pathname, "/"); 139 144 if ($slash != 0) { … … 141 146 $ipprc = PS::IPP::Config->new(); 142 147 } 143 $pathname = $ipprc-> convert_filename_absolute($pathname);148 $pathname = $ipprc->file_resolve($pathname); 144 149 } 145 150 146 my $file = basename($pathname);147 151 148 152 return ($pathname, $file); … … 154 158 my $path = shift; 155 159 my $filetype = shift; 160 my $chipname = shift; 161 $chipname = $chipname ? "$chipname|" : ""; 162 156 163 if (-e $path) { 157 164 my @finfo = stat($path); … … 160 167 my $md5sum = file_md5_hex($path); 161 168 162 return "$filename|$bytes|$md5sum|$filetype| ";169 return "$filename|$bytes|$md5sum|$filetype|$chipname"; 163 170 } else { 164 171 die "$filename not found at $path";
Note:
See TracChangeset
for help on using the changeset viewer.
