Index: trunk/ippScripts/scripts/publish_file.pl
===================================================================
--- trunk/ippScripts/scripts/publish_file.pl	(revision 29980)
+++ trunk/ippScripts/scripts/publish_file.pl	(revision 30376)
@@ -42,5 +42,5 @@
 
 # Parse the command-line arguments
-my ( $pub_id, $camera, $stage, $stage_id, $fileset, $format, $product, $workdir );
+my ( $pub_id, $camera, $stage, $stage_id, $fileset, $format, $product, $workdir, $need_magic );
 my ( $dbname, $verbose, $no_update, $no_op, $save_temps, $redirect );
 my ( $output_format );
@@ -54,4 +54,5 @@
     'fileset=s'         => \$fileset,     # Fileset name
     'workdir=s'         => \$workdir,     # Working directory
+    'need-magic'        => \$need_magic,  # do we require censored detections?
     'dbname=s'          => \$dbname,    # Database name
     'verbose'           => \$verbose,   # Print to stdout
@@ -166,4 +167,10 @@
     foreach my $comp ( @$components ) {
         my $path_base = $comp->{path_base}; # Base name for file
+        if (!$need_magic and $comp->{magicked}) {
+            # This client is authorized to receive uncensored detections
+            # Get the uri for the "backup" files
+            print "Using uncensored input from $path_base\n";
+            $path_base = $ipprc->destreaked_filename($path_base);
+        }
         next if defined $comp->{quality} and $comp->{quality} > 0;
         print "Warning: mis-matched comments\n" if defined $comment and $comment ne $comp->{comment};
@@ -181,5 +188,10 @@
             $filename = $ipprc->filename( "PSPHOT.OUT.CMF.MEF", "$path_base.pos" );
         }
-        $filename = $ipprc->file_resolve($filename);
+        &my_die("input file does not exist: $filename", $pub_id, $PS_EXIT_SYS_ERROR) if !$ipprc->file_exists($filename);
+        my $resolved = $ipprc->file_resolve($filename);
+        
+        &my_die("unable to resolve input file: $filename", $pub_id, $PS_EXIT_SYS_ERROR) if !$resolved;
+
+        $filename = $resolved;
 
         my $data = { zp => $zp,
