You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@sergeant.org on 2006/08/16 19:23:36 UTC
[SVN] [92] Fail open() when it's a dir
Revision: 92
Author: matt
Date: 2006-08-16 17:23:18 +0000 (Wed, 16 Aug 2006)
Log Message:
-----------
Fail open() when it's a dir
Modified Paths:
--------------
trunk/lib/AxKit2/Processor.pm
Modified: trunk/lib/AxKit2/Processor.pm
===================================================================
--- trunk/lib/AxKit2/Processor.pm 2006-08-16 17:14:25 UTC (rev 91)
+++ trunk/lib/AxKit2/Processor.pm 2006-08-16 17:23:18 UTC (rev 92)
@@ -50,7 +50,10 @@
@_ and $self->{input} = shift;
my $input = $self->{input}
- || do { open(my $fh, $self->{path}) || die "open($self->{path}): $!"; $fh };
+ || do { open(my $fh, $self->{path})
+ || die "open($self->{path}): $!";
+ die "open($self->{path}): directory" if -d $fh;
+ $fh };
if (ref($input) eq 'XML::LibXML::Document') {
return $input;