diff options
author | stevenwdv <stevenwdv@users.noreply.github.com> | 2021-09-11 13:17:11 +0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-02-17 02:16:50 -0300 |
commit | c3d13d216ae6be883491b929c1961b84e739a621 (patch) | |
tree | 824d07b2ddacc558d57eb3a74f1cb506d70e2a15 /src | |
parent | 9ea5e401e8c9ca71dfcf6298e8d7c8ec0f529fa2 (diff) | |
download | luarocks-c3d13d216ae6be883491b929c1961b84e739a621.tar.gz luarocks-c3d13d216ae6be883491b929c1961b84e739a621.tar.bz2 luarocks-c3d13d216ae6be883491b929c1961b84e739a621.zip |
Prevent creation of directory named '-p' on Windows
`tools.make_dir` used `mkdir -p <name>` while `-p` [is not an existing switch](https://docs.microsoft.com/windows-server/administration/windows-commands/mkdir) on Windows. The switch is also not necessary because plain `mkdir` on Windows also creates intermediate directories.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs/win32/tools.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index b8892b83..9bd050c6 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua | |||
@@ -36,7 +36,7 @@ end | |||
36 | function tools.make_dir(directory) | 36 | function tools.make_dir(directory) |
37 | assert(directory) | 37 | assert(directory) |
38 | directory = dir.normalize(directory) | 38 | directory = dir.normalize(directory) |
39 | fs.execute_quiet(vars.MKDIR.." -p ", directory) | 39 | fs.execute_quiet(vars.MKDIR, directory) |
40 | if not fs.is_dir(directory) then | 40 | if not fs.is_dir(directory) then |
41 | return false, "failed making directory "..directory | 41 | return false, "failed making directory "..directory |
42 | end | 42 | end |