[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.102,1.103"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sat Mar 7 13:58:06 UTC 2009
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv7823/lib/Locale/Po4a
Modified Files:
Xml.pm
Log Message:
* lib/Locale/Po4a/Xml.pm: Do not expect external entities to be in
the current directory. Use the current file's path instead.
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- Xml.pm 4 Mar 2009 22:01:30 -0000 1.102
+++ Xml.pm 7 Mar 2009 13:58:04 -0000 1.103
@@ -58,6 +58,8 @@
use Locale::Po4a::TransTractor;
use Locale::Po4a::Common;
use Carp qw(croak);
+use File::Basename;
+use File::Spec;
#It will mantain the path from the root tag to the current one
my @path;
@@ -756,6 +758,10 @@
}
}
my $i = 0;
+ my $basedir = $tag[1];
+ $basedir =~ s/:[0-9]+$//;
+ $basedir = dirname($basedir);
+
while ( $i < $#tag ) {
my $t = $tag[$i];
my $ref = $tag[$i+1];
@@ -781,6 +787,7 @@
if ($self->{options}{'includeexternal'}) {
$entities{$name} = $part2;
$entities{$name} =~ s/^"?(.*?)".*$/$1/s;
+ $entities{$name} = File::Spec->catfile($basedir, $entities{$name});
}
}
if ((not $file) and (not $includenow)) {
More information about the Po4a-commits
mailing list