texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/ext/epub3.pm (epub_setup): use / as file sep


From: Patrice Dumas
Subject: branch master updated: * tp/ext/epub3.pm (epub_setup): use / as file separator for INFO_JS_DIR, which is used both for HTML paths, requiring / and paths to files on the filesystem, for which / may not be native, but works for Unix and Windows paths. Report from Eli Zaretskii.
Date: Sun, 23 Oct 2022 15:40:43 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 4d815157e2 * tp/ext/epub3.pm (epub_setup): use / as file separator for 
INFO_JS_DIR, which is used both for HTML paths, requiring / and paths to files 
on the filesystem, for which / may not be native, but works for Unix and 
Windows paths.  Report from Eli Zaretskii.
4d815157e2 is described below

commit 4d815157e210da06de45ea8469681a62a9eeba42
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Oct 23 21:39:03 2022 +0200

    * tp/ext/epub3.pm (epub_setup): use / as file separator for
    INFO_JS_DIR, which is used both for HTML paths, requiring / and
    paths to files on the filesystem, for which / may not be native,
    but works for Unix and Windows paths.  Report from Eli Zaretskii.
---
 ChangeLog       |  9 ++++++++-
 tp/ext/epub3.pm | 15 ++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fadcd448ef..9d2281b3db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,13 +43,20 @@
        * install-info/tests/ii-0056-test: Correct test number and update
        reference results.
 
+2022-10-23  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/ext/epub3.pm (epub_setup): use / as file separator for
+       INFO_JS_DIR, which is used both for HTML paths, requiring / and
+       paths to files on the filesystem, for which / may not be native,
+       but works for Unix and Windows paths.  Report from Eli Zaretskii.
+
 2022-10-23  Patrice Dumas  <pertusus@free.fr>
 
        Avoid UTF-8 encoded file name in make rule prerequisite
 
        * tp/maintain/copy_change_file_name_encoding.pl, tp/tests/Makefile.am:
        convert to latin1 from plain ASCII filename, substituting accented
-       letters in tp/maintain/copy_change_file_name_encoding.pl.  report from
+       letters in tp/maintain/copy_change_file_name_encoding.pl.  Report from
        Eli Zaretskii.
 
 2022-10-23  Gavin Smith  <gavinsmith0123@gmail.com>
diff --git a/tp/ext/epub3.pm b/tp/ext/epub3.pm
index 63b34d115b..068e1e5e13 100644
--- a/tp/ext/epub3.pm
+++ b/tp/ext/epub3.pm
@@ -434,12 +434,17 @@ sub epub_setup($)
     # re-set INFO_JS_DIR up to have the javascript and
     # css files in a directory rooted at $epub_document_dir_name
     $epub_info_js_dir_name = $self->get_conf('INFO_JS_DIR');
-    # FIXME INFO_JS_DIR is used both as a filesystem directory name
-    # and as path in document, as a path in document '../' should be
-    # used whatever File::Spec->updir() is.
     my $updir = File::Spec->updir();
-    $self->force_conf('INFO_JS_DIR', File::Spec->catdir($updir,
-                                                  $epub_info_js_dir_name));
+    # FIXME INFO_JS_DIR is used both as a filesystem directory name
+    # and as path in HTML files.  As a path in HTML, / should always be
+    # used.  File::Spec->catdir is better for filesystem paths.  We finally
+    # hardocde '/' as separator because it is needed for HTML paths and it
+    # works for both for Unix and Windows filesystems, but it is not
+    # clean.
+    #$self->force_conf('INFO_JS_DIR', File::Spec->catdir($updir,
+    #                                              $epub_info_js_dir_name));
+    $self->force_conf('INFO_JS_DIR', join('/', ($updir,
+                                                  $epub_info_js_dir_name)));
     # TODO make sure it is SPLIT and set SPLIT if not?
   }
 



reply via email to

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