Changeset 1970


Ignore:
Timestamp:
Jun 15, 2015, 2:09:39 PM (4 years ago)
Author:
bruno
Message:

Fix again a recursive issue with a file handle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1968 r1970  
    45664566my @files;
    45674567
    4568 opendir(DIR,"$dir") || confess "Unable to open directory $dir: $!";
    4569 foreach my $f (readdir(DIR)) {
     4568# In a recursive function , we need a local var as DIR handle
     4569my $bdir;
     4570
     4571opendir($bdir,"$dir") || confess "Unable to open directory $dir: $!";
     4572foreach my $f (readdir($bdir)) {
    45704573    next if ($f =~ /^\./);
    45714574    # Skip potential patch dir
     
    45854588    }
    45864589}
    4587 closedir(DIR);
     4590closedir($bdir);
    45884591# Not enough but still a first cleanup
    45894592pb_rm_rf("$dir");
Note: See TracChangeset for help on using the changeset viewer.