Skip to content

Commit f4d5280

Browse files
committed
test
1 parent a74265f commit f4d5280

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

tlcli/commands/gen.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ local mkdir_cache = {}
1919

2020
local function make_dir_for(pathname)
2121
local normalized, root = common.normalize(pathname)
22-
print("pathname:", pathname)
23-
print("normalized to:", normalized)
24-
print("with root:", root)
25-
if normalized == root then
22+
local dirname = normalized:match("^(.*" .. common.sep .. ")[^" .. common.sep .. "]+$")
23+
24+
if dirname == root then
2625
return
2726
end
28-
local dirname = normalized:match("^(.+)" .. common.sep .. "[^" .. common.sep .. "]+$")
29-
print("extracted dirname:", dirname)
3027
if dirname then
3128
if mkdir_cache[dirname] then
3229
return

tlcli/commands/gen.tl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ local mkdir_cache = {}
1919

2020
local function make_dir_for(pathname: string)
2121
local normalized, root = common.normalize(pathname)
22-
print("pathname:", pathname)
23-
print("normalized to:", normalized)
24-
print("with root:", root)
25-
if normalized == root then
22+
local dirname = normalized:match("^(.*" .. common.sep .. ")[^" .. common.sep .. "]+$")
23+
-- on Windows, root contains the drive letter and looks like `D:\`
24+
if dirname == root then
2625
return
2726
end
28-
local dirname = normalized:match("^(.+)" .. common.sep .. "[^" .. common.sep .. "]+$")
29-
print("extracted dirname:", dirname)
3027
if dirname then
3128
if mkdir_cache[dirname] then
3229
return

0 commit comments

Comments
 (0)