texlive[46979] Build/source/texk/web2c/lib/texmfmp.c: fix a w32 bug

commits+kakuto at tug.org commits+kakuto at tug.org
Fri Mar 16 14:37:06 CET 2018


Revision: 46979
          http://tug.org/svn/texlive?view=revision&revision=46979
Author:   kakuto
Date:     2018-03-16 14:37:05 +0100 (Fri, 16 Mar 2018)
Log Message:
-----------
fix a w32 bug in texmfmp.c (w32 only)

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/lib/texmfmp.c

Modified: trunk/Build/source/texk/web2c/lib/texmfmp.c
===================================================================
--- trunk/Build/source/texk/web2c/lib/texmfmp.c	2018-03-16 12:12:53 UTC (rev 46978)
+++ trunk/Build/source/texk/web2c/lib/texmfmp.c	2018-03-16 13:37:05 UTC (rev 46979)
@@ -807,8 +807,8 @@
             *pp = '/';
         }
       }
+      is_absolute = kpse_absolute_p(argv[argc-1], false);
       name = normalize_quotes(argv[argc-1], "argument");
-      is_absolute = kpse_absolute_p(name, false);
 #ifdef XeTeX
       main_input_file = kpse_find_file(argv[argc-1], INPUT_FORMAT, false);
       if (!srcspecialsp) {
@@ -818,7 +818,10 @@
         if (!is_absolute) {
           strptr = strrchr (name, '/');
           if (strptr) {
-            strptr++;
+            if (name[0] == '"')
+              *strptr = '"';
+            else
+              strptr++;
             name = strptr;
           }
         }
@@ -845,7 +848,10 @@
         if (!is_absolute) {
           strptr = strrchr (name, '/');
           if (strptr) {
-            strptr++;
+            if (name[0] == '"'
+              *strptr = '"';
+            else
+              strptr++;
             name = strptr;
           }
         }
@@ -1592,12 +1598,9 @@
           pp++;
       }
     }
+    is_absolute = kpse_absolute_p(argv[optind], false);
 #endif
-
     name = normalize_quotes(argv[optind], "argument");
-#ifdef WIN32
-    is_absolute = kpse_absolute_p(name, false);
-#endif
 #ifdef XeTeX
     input_file_name = kpse_find_file(argv[optind], INPUT_FORMAT, false);
 #ifdef WIN32
@@ -1629,7 +1632,10 @@
       if (!is_absolute) {
         strptr = strrchr (name, '/');
         if (strptr) {
-          strptr++;
+          if (name[0] == '"')
+            *strptr = '"';
+          else
+            strptr++;
           name = strptr;
         }
       }



More information about the tex-live-commits mailing list