[Po4a-commits] "po4a/lib/Locale/Po4a TeX.pm,1.103,1.104"

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Wed Mar 17 09:35:44 UTC 2010


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv18303/lib/Locale/Po4a

Modified Files:
	TeX.pm 
Log Message:
	* lib/Locale/Po4a/TeX.pm: Die with a more sensible error if a file
	cannot be found with kpsewhich.


Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- TeX.pm	15 Jan 2010 19:27:24 -0000	1.103
+++ TeX.pm	17 Mar 2010 09:35:41 -0000	1.104
@@ -957,10 +957,17 @@
             if ($include) {
                 # search the file
                 open (KPSEA, "kpsewhich " . $newfilename . " |");
-                $newfilename = <KPSEA>;
+                my $newfilepath = <KPSEA>;
+
+                if ($newfilename ne "" and $newfilepath eq "") {
+                    die wrap_mod("po4a::tex",
+                                 dgettext("po4a",
+                                          "Can't find %s with kpsewhich"),
+                                 $filename);
+                }
 
                 push @entries, read_file($self,
-                                         $newfilename);
+                                         $newfilepath);
                 if ($tag eq "include") {
                     $textline = "\\clearpage".$end;
                 } else {




More information about the Po4a-commits mailing list