fixed testutil to support cygwin which reports -z = true on directories

This commit is contained in:
Lucas Theisen 2016-02-27 12:19:57 -05:00 committed by Adam Spiers
parent cc0767597e
commit c171ca8d83

View file

@ -228,7 +228,7 @@ sub remove_dir {
next NODE if $node eq '..'; next NODE if $node eq '..';
my $path = "$dir/$node"; 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"; unlink $path or die "cannot unlink $path ($!)\n";
} }
elsif (-d "$path") { elsif (-d "$path") {