Index: trunk/pstamp/scripts/pstamp_get_image_job.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_get_image_job.pl	(revision 20219)
+++ trunk/pstamp/scripts/pstamp_get_image_job.pl	(revision 20220)
@@ -106,4 +106,5 @@
     my $pathname = shift @fields;
     my $filetype = shift @fields;
+    my $class_id = shift @fields;
 
     ($pathname , my $filename) = resolvepath($pathname);
@@ -121,5 +122,5 @@
 
     # XXX is pstamp always the right file type, if not where can we get the right one?
-    print REGLIST file_registration_line($filename, $dest_path, $filetype);
+    print REGLIST file_registration_line($filename, $dest_path, $filetype, $class_id);
 
     foreach my $f (@fields) {
@@ -136,4 +137,8 @@
     my $pathname = $_[0];
 
+    # use the basename of the unresolved file as the name of the file
+    # in order to avoid nebulous name mangled paths in the datastore
+    my $file = basename($pathname);
+
     my $slash = index($pathname, "/");
     if ($slash != 0) {
@@ -141,8 +146,7 @@
             $ipprc = PS::IPP::Config->new();
         }
-        $pathname = $ipprc->convert_filename_absolute($pathname);
+        $pathname = $ipprc->file_resolve($pathname);
     }
 
-    my $file = basename($pathname);
 
     return ($pathname, $file);
@@ -154,4 +158,7 @@
     my $path     = shift;
     my $filetype = shift;
+    my $chipname = shift;
+    $chipname = $chipname ? "$chipname|" : "";
+
     if (-e $path) {
         my @finfo = stat($path);
@@ -160,5 +167,5 @@
         my $md5sum = file_md5_hex($path);
 
-        return "$filename|$bytes|$md5sum|$filetype|";
+        return "$filename|$bytes|$md5sum|$filetype|$chipname";
     } else {
         die "$filename not found at $path";
