[latex3-commits] [git/LaTeX3-latex3-l3build] master: Enable cleandir() recursively (b52aade)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Mar 4 09:19:28 CET 2020
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/b52aade3f29fd2caf896f39f9c57db94d5f4e21d
>---------------------------------------------------------------
commit b52aade3f29fd2caf896f39f9c57db94d5f4e21d
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Mar 4 08:19:28 2020 +0000
Enable cleandir() recursively
>---------------------------------------------------------------
b52aade3f29fd2caf896f39f9c57db94d5f4e21d
CHANGELOG.md | 3 +++
l3build-file-functions.lua | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b0cc92a..932fda0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Fixed
+- Enable `cleandir()` recursively
+
## [2020-02-21]
### Changed
diff --git a/l3build-file-functions.lua b/l3build-file-functions.lua
index e3000b4..6c420f8 100644
--- a/l3build-file-functions.lua
+++ b/l3build-file-functions.lua
@@ -204,7 +204,7 @@ function cleandir(dir)
if errorlevel ~= 0 then
return errorlevel
end
- return rm(dir, "*")
+ return rm(dir, "**")
end
-- Copy files 'quietly'
@@ -376,7 +376,7 @@ end
-- Remove file(s) based on a glob
function rm(source, glob)
- for _,i in ipairs(filelist(source, glob)) do
+ for i,_ in pairs(tree(source, glob)) do
rmfile(source,i)
end
-- os.remove doesn't give a sensible errorlevel
More information about the latex3-commits
mailing list.