texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_do_js_files): enco


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_do_js_files): encode $jsdir before creating the directory. Create the directory by calling create_destination_directory().
Date: Mon, 30 Sep 2024 17:08:56 -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 5acb0a0c8a * tp/Texinfo/Convert/HTML.pm (_do_js_files): encode $jsdir 
before creating the directory.  Create the directory by calling 
create_destination_directory().
5acb0a0c8a is described below

commit 5acb0a0c8a85de3f223530b0d713cbb0b859a010
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Jul 23 11:56:34 2024 +0200

    * tp/Texinfo/Convert/HTML.pm (_do_js_files): encode $jsdir before
    creating the directory.  Create the directory by calling
    create_destination_directory().
---
 ChangeLog                  |  6 ++++++
 tp/Texinfo/Convert/HTML.pm | 14 +++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 24ba43e0f2..8cec431f64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-23  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_do_js_files): encode $jsdir before
+       creating the directory.  Create the directory by calling
+       create_destination_directory().
+
 2024-07-23  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/converter.h (PATHS_INFORMATION)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 97f6fdaaef..0101033544 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -12824,16 +12824,12 @@ sub _do_js_files($$)
     } else {
       $jsdir = $info_js_dir;
     }
-    if (!-d $jsdir) {
-      if (-f $jsdir) {
-        $self->converter_document_error(
-          sprintf(__("%s already exists but is not a directory"), $jsdir));
-      } else {
-        mkdir $jsdir;
-      }
-    }
+    my ($encoded_jsdir, $dir_encoding)
+      = $self->encoded_output_file_name($jsdir);
+    my $succeeded
+      = $self->create_destination_directory($encoded_jsdir, $jsdir);
     # Copy JS files.
-    if (-d $jsdir) {
+    if ($succeeded) {
       if (!$self->get_conf('TEST')) {
         my $jssrcdir;
         if (!$Texinfo::ModulePath::texinfo_uninstalled) {



reply via email to

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