perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Chamas <j...@chamas.com>
Subject Re: "bug" in FileId() ?
Date Wed, 20 Nov 2002 21:27:58 GMT
Peter Galbavy wrote:
 >
> perl's stat() returns and empty array if the stat fails, so the above code
> can be reduced to:
> 
>    my @inode_stat = ();
>     if($self->{inode_names}) {
>         print STDERR "\ninode_names is SET\n";
>         @inode_stat = stat($file);
>     }
> 
> And it now works for me and passes all tests.
> 

For now, let's try this code:

     if($self->{inode_names}) {
	@inode_stat = stat($file);
	# one or the other device or file ids must be not 0
	unless($inode_stat[0] || $inode_stat[1]) {
	    @inode_stat = ();
	}

What I would like to avoid is having InodeNames try to work on
any system for which device and file ids are 0

I'll send you a copy of this distribution privately so you
can test on your system.

Regards,

Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message