Changeset 72

Show
Ignore:
Timestamp:
10/24/06 19:43:51 (2 years ago)
Author:
mart
Message:

S_ISLNK doesn't work under ActiveState Perl on Windows, so fall back on the -l operator if the call fails.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Brackup/File.pm

    r36 r72  
    5353sub is_link { 
    5454    my $self = shift; 
    55     return S_ISLNK($self->stat->mode); 
     55    my $result = eval { S_ISLNK($self->stat->mode) }; 
     56    $result = -l $self->fullpath unless defined($result); 
     57    return $result; 
    5658} 
    5759