Changeset 27639

Show
Ignore:
Timestamp:
18.06.2013 10:10:38 (6 years ago)
Author:
jmt12
Message:

Change it so failure to open a filehandle isn't fatal - leave it up to the caller to deal with

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/FileUtils.pm

    r27520 r27639  
    911911    $mode_symbol .= ':' . $encoding; 
    912912  } 
    913   if (!open($$fh_ref, $mode_symbol, $path)) 
    914   { 
    915     die("Error! Failed to open file for " . $mode . ": " . $path . "\n"); 
    916   } 
    917   return 1; 
     913  return open($$fh_ref, $mode_symbol, $path); 
    918914} 
    919915## openFileHandle() 
     916 
    920917 
    921918## @function readDirectory()