diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-02-08 19:42:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-02-08 19:42:00 +0100 |
commit | de251392fffd63bae7e586b9cf7a7991c30195ff (patch) | |
tree | e3d54fa2a68fb414856fc909aeea5e1f33e1ac69 /tex/generic | |
parent | ac5bb04c922ee746e65acbd513e8d604c363de1c (diff) | |
download | context-de251392fffd63bae7e586b9cf7a7991c30195ff.tar.gz |
beta 2010.02.08 19:42
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index b6e57ed2a..69446a8e6 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 02/02/10 23:13:26 +-- merge date : 02/08/10 19:47:32 do -- begin closure to overcome local limits and interference @@ -1543,15 +1543,17 @@ function file.join_path(tab) end function file.collapse_path(str) - str = gsub(str,"/%./","/") - local n, m = 1, 1 - while n > 0 or m > 0 do - str, n = gsub(str,"[^/%.]+/%.%.$","") - str, m = gsub(str,"[^/%.]+/%.%./","") - end - str = gsub(str,"([^/])/$","%1") - str = gsub(str,"^%./","") - str = gsub(str,"/%.$","") + if find(str,"/") then + str = gsub(str,"/%./","/") + local n, m = 1, 1 + while n > 0 or m > 0 do + str, n = gsub(str,"[^/%.]+/%.%.$","") + str, m = gsub(str,"[^/%.]+/%.%./","") + end + str = gsub(str,"([^/])/$","%1") + str = gsub(str,"^%./","") + str = gsub(str,"/%.$","") + end if str == "" then str = "." end return str end |