Changeset 30353 for gs2-extensions
- Timestamp:
- 2015-12-16T15:46:58+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/perllib/plugins/DirectoryPlugin.pm
r30289 r30353 83 83 my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 84 84 85 print STDERR "INFO: This DirectoryPlugin supports version 2 manifest files\n";86 87 85 if ($self->{'info_only'}) { 88 86 # don't worry about any options or initialisations etc … … 117 115 $self->{'failhandle'} = $failhandle; 118 116 117 if ($self->{'verbosity'} > 2) { 118 print "[INFO] This DirectoryPlugin supports version 2 manifest files\n"; 119 } 119 120 } 120 121 … … 184 185 my $self = shift(@_); 185 186 my ($dirname) = @_; 186 187 return undef unless (-d $dirname); 187 188 #return undef unless (-d $dirname); 189 return undef unless (&FileUtils::directoryExists($dirname)); 188 190 189 191 return 0 if ($self->{'block_exp'} ne "" && $dirname =~ /$self->{'block_exp'}/); … … 318 320 319 321 # find all the files in the directory 320 if (!opendir (DIR, $dirname)) { 322 my $rvalue = &FileUtils::readDirectory($dirname); 323 if (!defined $rvalue) { 321 324 if ($gli) { 322 325 print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n"; … … 325 328 return -1; # error in processing 326 329 } 327 @dir = sort readdir (DIR); 328 closedir (DIR); 329 330 @dir = sort @{$rvalue}; 331 #} 332 #else 333 #{ 334 #if (!opendir (DIR, $dirname)) { 335 # if ($gli) { 336 # print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n"; 337 # } 338 # print $outhandle "DirectoryPlugin: WARNING - couldn't read directory $dirname\n"; 339 # return -1; # error in processing 340 # } 341 # @dir = sort readdir (DIR); 342 # closedir (DIR); 343 # } 344 345 ###print "===== Dir contents =====\n"; 346 ###use Devel::Peek; 347 ###Dump(@dir); 348 ###print "\n===== =====\n"; 349 330 350 for (my $i = 0; $i < scalar(@dir); $i++) { 331 351 my $raw_subfile = $dir[$i]; … … 400 420 my @dir; 401 421 402 print $outhandle "DirectoryPlugin read: getting directory $dirname\n" if ($verbosity > 2);422 print $outhandle "DirectoryPlugin processing $dirname\n"; 403 423 404 424 # find all the files in the directory … … 574 594 next; 575 595 } 576 print STDERR "** DirectoryPlugin processing $raw_full_filename\n";596 ###rint STDERR "** DirectoryPlugin processing $raw_full_filename\n"; 577 597 # Follow Windows shortcuts 578 598 if ($raw_subfile =~ m/(?i)\.lnk$/ && (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin"))) {
Note:
See TracChangeset
for help on using the changeset viewer.