mirror of
https://github.com/EngineerSmith/nativefs.git
synced 2025-11-08 23:15:02 +00:00
Merge branch 'zorgnn-patch-1'
This commit is contained in:
@@ -292,7 +292,7 @@ end
|
|||||||
function nativefs.createDirectory(path)
|
function nativefs.createDirectory(path)
|
||||||
local current = ''
|
local current = ''
|
||||||
for dir in path:gmatch('[^/\\]+') do
|
for dir in path:gmatch('[^/\\]+') do
|
||||||
current = (current == '' and current or current .. '/') .. dir
|
current = current .. dir .. '/'
|
||||||
local info = nativefs.getInfo(current, 'directory')
|
local info = nativefs.getInfo(current, 'directory')
|
||||||
if not info and not mkdir(current) then return false, "Could not create directory " .. current end
|
if not info and not mkdir(current) then return false, "Could not create directory " .. current end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user