[latex3-commits] [git/l3build] sourcedir: Make sure ren() accounts for leading "./" (7cd10fb)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Dec 10 13:30:18 CET 2017


Repository : https://github.com/latex3/l3build
On branch  : sourcedir
Link       : https://github.com/latex3/l3build/commit/7cd10fbacb696d99ff21b75df8ed22962c104585

>---------------------------------------------------------------

commit 7cd10fbacb696d99ff21b75df8ed22962c104585
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Dec 10 12:30:18 2017 +0000

    Make sure ren() accounts for leading "./"


>---------------------------------------------------------------

7cd10fbacb696d99ff21b75df8ed22962c104585
 l3build.lua |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/l3build.lua b/l3build.lua
index 3aae8d5..1ed632a 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -743,6 +743,8 @@ end
 function ren(dir, source, dest)
   local dir = dir .. "/"
   if os_type == "windows" then
+    local source = gsub(source, "^%.+/", "")
+    local dest = gsub(dest, "^%.+/", "")
     return execute("ren " .. unix_to_win(dir) .. source .. " " .. dest)
   else
     return execute("mv " .. dir .. source .. " " .. dir .. dest)





More information about the latex3-commits mailing list