texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Wed, 31 Jan 2024 16:37:34 -0500 (EST)

branch: master
commit b659f4bb352b68744a34715c505f98ed0f15c9e1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jan 31 22:37:22 2024 +0100

    * tp/Texinfo/Common.pm (locate_include_file): change code used to
    concatenate directories and file to get the same result as with XS/C
    in tests.
---
 ChangeLog            | 6 ++++++
 tp/Texinfo/Common.pm | 9 +++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 653b8b5f59..ef9ccf5c7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-31  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (locate_include_file): change code used to
+       concatenate directories and file to get the same result as with XS/C
+       in tests.
+
 2024-01-31  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Common.pm (locate_include_file): simplify code.
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 4ccb57e271..18070c0f3e 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1206,9 +1206,14 @@ sub locate_include_file($$)
       my ($include_volume, $include_dir_path, $include_filename)
          = File::Spec->splitpath($include_dir, 1);
 
+      # catpath/catdir remove leading . and remove empty directories
+      # within paths.  To be more like XS/C output, we do it more simply
+      #my $possible_file = File::Spec->catpath($include_volume,
+      #  File::Spec->catdir(File::Spec->splitdir($include_dir_path),
+      #                     @directories), $filename);
+      my $filepath = $directories . $filename;
       my $possible_file = File::Spec->catpath($include_volume,
-        File::Spec->catdir(File::Spec->splitdir($include_dir_path),
-                           @directories), $filename);
+                      $include_dir_path, $filepath);
       if (-e $possible_file and -r $possible_file) {
         return $possible_file;
       }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]