Browse Source

get rid of the potential to create links to files that don't exist - thanks @mmccollow

pull/152/head
nruest 12 years ago
parent
commit
4e647fa39a
  1. 5
      plugins/fits.inc

5
plugins/fits.inc

@ -36,10 +36,11 @@ class fits {
*/ */
function extractFits($parameterArray, $dsid, $file, $file_ext) { function extractFits($parameterArray, $dsid, $file, $file_ext) {
$file_suffix = '_' . $dsid . '.xml'; $file_suffix = '_' . $dsid . '.xml';
$returnValue = TRUE;
$output = array(); $output = array();
exec('fits.sh -i ' . escapeshellarg($file) . '', $output); exec('fits.sh -i ' . escapeshellarg($file) . '', $output);
file_put_contents($file . $file_suffix, implode("\n", $output)); if ( !file_put_contents($file . $file_suffix, implode("\n", $output)) ) {
exit("Error writing file: ". $file_name);
}
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix; $_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix;
return TRUE; return TRUE;
} }

Loading…
Cancel
Save