From c171ca8d839e0cd3d67d754b442c38865b6a8c4f Mon Sep 17 00:00:00 2001 From: Lucas Theisen Date: Sat, 27 Feb 2016 12:19:57 -0500 Subject: [PATCH] fixed testutil to support cygwin which reports -z = true on directories --- t/testutil.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/testutil.pm b/t/testutil.pm index 32fc2f1..1e73dfe 100755 --- a/t/testutil.pm +++ b/t/testutil.pm @@ -228,7 +228,7 @@ sub remove_dir { next NODE if $node eq '..'; my $path = "$dir/$node"; - if (-l $path or -z $path or $node eq $Stow::LOCAL_IGNORE_FILE) { + if (-l $path or (-f $path and -z $path) or $node eq $Stow::LOCAL_IGNORE_FILE) { unlink $path or die "cannot unlink $path ($!)\n"; } elsif (-d "$path") {