--- lib/BackupPC/Lib.pm 2007-11-26 04:00:07.000000000 +0100 +++ lib/BackupPC/Lib.pm 2008-04-13 12:52:03.938619979 +0200 @@ -485,10 +485,15 @@ from_to($path, "utf8", $need->{charsetLegacy}) if ( $need->{charsetLegacy} ne "" ); - return if ( !opendir(my $fh, $path) ); + my ($fh); + if ( !opendir($fh, $path) ) { + print "log ERROR: opendir ($path) failed\n"; + return; + } + if ( $IODirentOk ) { @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh)); - map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric + map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types } else { @entries = map { { name => $_} } readdir($fh); } @@ -553,9 +559,11 @@ return if ( !chdir($dir) ); my $entries = $bpc->dirRead(".", {inode => 1, type => 1}); #print Dumper($entries); + #print ("log got ",scalar(@$entries)," entries for $dir\n"); foreach my $f ( @$entries ) { next if ( $f->{name} eq ".." || $f->{name} eq "." && $dontDoCwd ); $param->{wanted}($f->{name}, "$dir/$f->{name}"); + #if ( $f->{type} != BPC_DT_DIR ) { print ("log skipping non-directory ", $f->{name}, " type: ", $f->{type}, "\n"); } next if ( $f->{type} != BPC_DT_DIR || $f->{name} eq "." ); chdir($f->{name}); $bpc->find($param, "$dir/$f->{name}", 1);