Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always add a slash after directory names in mkdir #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ copy and rename new files (must be done manually as far as I can see)
- Add version info to NEWS
- Enable unicode in lualibs-unicode (until we remove the dependency ...)
- Disable outer return statements in lualibs-util-jsn and lualibs-util-zip
- In `lualibs-dir.lua`, replace all `mkdir(pth)` with `mkdir(pth .. '/')`.


## Step 4
Expand Down
6 changes: 3 additions & 3 deletions lualibs-dir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ if onwindows then
pth = pth .. "/" .. s
end
if make_indeed and not isdir(pth) then
mkdir(pth)
mkdir(pth .. '/')
end
end
return pth, (isdir(pth) == true)
Expand Down Expand Up @@ -525,15 +525,15 @@ else
pth = pth .. "/" .. s
end
if make_indeed and not first and not isdir(pth) then
mkdir(pth)
mkdir(pth .. '/')
end
end
else
pth = "."
for s in gmatch(str,"[^/]+") do
pth = pth .. "/" .. s
if make_indeed and not isdir(pth) then
mkdir(pth)
mkdir(pth .. '/')
end
end
end
Expand Down