diff options
Diffstat (limited to 'cpan/Test-Simple')
-rw-r--r-- | cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t b/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t index 0e79101d51..367d0ef6a0 100644 --- a/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t +++ b/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t @@ -160,11 +160,13 @@ ok(!-d $tmpdir, "cleaned up temp dir"); if (opendir(my $d, $tmpdir)) { for my $f (readdir($d)) { next if $f =~ m/^\.+$/; - next unless -f "$tmpdir/$f"; - unlink("$tmpdir/$f"); + my $file = File::Spec->catfile($tmpdir, $f); + next unless -f $file; + 1 while unlink $file; } + closedir($d); + rmdir($tmpdir) or warn "Could not remove temp dir '$tmpdir': $!"; } - rmdir($tmpdir) or warn "Could not remove temp dir '$tmpdir': $!"; }; $cleanup->(); |