From 7c55167ecf36309f45793303eea23651cb983f12 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 6 Nov 2019 22:12:38 +0000
Subject: l2e (6nov19)

git-svn-id: svn://tug.org/texlive/trunk@52656 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/graphics/graphics.sty | 30 +++++++++++++++++++----
 1 file changed, 25 insertions(+), 5 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/graphics/graphics.sty')

diff --git a/Master/texmf-dist/tex/latex/graphics/graphics.sty b/Master/texmf-dist/tex/latex/graphics/graphics.sty
index 06f25bcec51..e6bdc2f8669 100644
--- a/Master/texmf-dist/tex/latex/graphics/graphics.sty
+++ b/Master/texmf-dist/tex/latex/graphics/graphics.sty
@@ -29,7 +29,7 @@
 \DeclareCurrentRelease{}{2019-10-01}
 
 \ProvidesPackage{graphics}
-          [2019/10/08 v1.3c  Standard LaTeX Graphics (DPC,SPQR)]
+          [2019/11/01 v1.3d  Standard LaTeX Graphics (DPC,SPQR)]
 \edef\Gin@codes{%
  \catcode`\noexpand\^^A\the\catcode`\^^A\relax
  \catcode`\noexpand\"\the\catcode`\"\relax
@@ -168,6 +168,7 @@
      \edef\Gin@ext{#1}}{}}%
 \let\Gin@ext\relax
 \def\Gin@sepdefault{.}
+\edef\Gin@gzext{\detokenize{gz}}
 \def\Gin@temp#1{%
   \begingroup
     \escapechar\m@ne
@@ -195,10 +196,15 @@
   \begingroup
   \let\input@path\Ginput@path
   \set@curr@file{#1}%
-  \edef\uq@curr@file{\expandafter\unquote@name\expandafter{\@curr@file}}%
-  \expandafter\filename@parse\expandafter{\uq@curr@file}%
-  \edef\filename@area{\expandafter\quote@name\expandafter{\filename@area}}%
-  \edef\filename@base{\expandafter\quote@name\expandafter{\filename@base}}%
+  \expandafter\filename@parse\expandafter{\@curr@file}%
+  \ifx\filename@ext\Gin@gzext
+    \expandafter\filename@parse\expandafter{\filename@base}%
+    \ifx\filename@ext\relax
+      \let\filename@ext\Gin@gzext
+    \else
+      \edef\Gin@ext{\Gin@ext\Gin@sepdefault\Gin@gzext}%
+    \fi
+  \fi
   \ifx\filename@ext\relax
     \@for\Gin@temp:=\Gin@extensions\do{%
       \ifx\Gin@ext\relax
@@ -206,6 +212,20 @@
       \fi}%
   \else
     \Gin@getbase{\Gin@sepdefault\filename@ext}%
+\ifx\Gin@ext\relax
+\let\Gin@savedbase\filename@base
+\let\Gin@savedext\filename@ext
+  \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}%
+  \let\filename@ext\relax
+   \@for\Gin@temp:=\Gin@extensions\do{%
+      \ifx\Gin@ext\relax
+        \Gin@getbase\Gin@temp
+      \fi}%
+  \ifx\Gin@ext\relax
+    \let\filename@base\Gin@savedbase
+    \let\filename@ext\Gin@savedext
+  \fi
+\fi
     \ifx\Gin@ext\relax
        \@warning{File `#1' not found}%
        \def\Gin@base{\filename@area\filename@base}%
-- 
cgit v1.2.3

