Ignore:
Timestamp:
2015-12-16T15:43:01+13:00 (8 years ago)
Author:
jmt12
Message:

Restructured readDirectory to not die if directory isn't readable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/LocalFS.pm

    r27682 r30351  
    345345{
    346346  my $path = shift(@_);
    347   opendir(DH, $path) or &FileUtils::printError('Failed to open directory for reading: ' . $path, 1);
    348   my @files = readdir(DH);
    349   close(DH);
    350   return \@files;
     347  my $rvalue;
     348  if (opendir(DH, $path))
     349  {
     350      my @files = readdir(DH);
     351      close(DH);
     352      $rvalue = \@files;
     353  }
     354  return $rvalue;
    351355}
    352356# /** readDirectory() **/
Note: See TracChangeset for help on using the changeset viewer.