- Timestamp:
- 2013-05-21T14:46:55+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/perllib/plugins/DirectoryPlugin.pm
r26987 r27377 181 181 182 182 # replace -d with function in util library 183 return undef unless (& util::dir_exists($dirname));183 return undef unless (&FileUtils::directoryExists($dirname)); 184 184 185 185 return 0 if ($self->{'block_exp'} ne "" && $dirname =~ /$self->{'block_exp'}/); … … 308 308 $block_hash->{'shared_fileroot'} = {} unless defined $block_hash->{'shared_fileroot'}; 309 309 310 # Recur over directory contents. 311 my (@dir, $subfile); 312 #my $count = 0; 313 310 # Recur over directory contents. 314 311 print $outhandle "DirectoryPlugin block: getting directory $dirname\n" if ($verbosity > 2); 315 312 316 313 # find all the files in the directory 317 my $dir_read = &util::file_readdir($dirname, \@dir); 318 if (!$dir_read) { 319 if ($gli) { 320 print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n"; 321 } 322 print $outhandle "DirectoryPlugin: WARNING - couldn't read directory $dirname\n"; 323 return -1; # error in processing 314 my @dir = @{&FileUtils::readDirectory($dirname)}; 315 if (scalar(@dir) == 0) 316 { 317 if ($gli) 318 { 319 print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n"; 320 } 321 print $outhandle "DirectoryPlugin: WARNING - couldn't read directory $dirname\n"; 322 return -1; # error in processing 324 323 } 325 324 … … 394 393 395 394 # Recur over directory contents. 396 my (@dir, $subfile);397 395 print $outhandle "DirectoryPlugin read: getting directory $dirname\n" if ($verbosity > 2); 398 396 399 397 # find all the files in the directory 400 my $dir_read = &util::file_readdir($dirname, \@dir);401 if ( !$dir_read)398 my @dir = @{&FileUtils::readDirectory($dirname)}; 399 if (scalar(@dir) == 0) 402 400 { 403 401 if ($gli)
Note:
See TracChangeset
for help on using the changeset viewer.