fix absolute path handling in createDirectory

This commit is contained in:
Grump
2020-07-23 19:27:48 +02:00
parent eb00b9fd0a
commit c01aea7dfa
2 changed files with 3 additions and 1 deletions

View File

@@ -318,7 +318,7 @@ function nativefs.getDriveList()
end
function nativefs.createDirectory(path)
local current = ''
local current = path:sub(1, 1) == '/' and '/' or ''
for dir in path:gmatch('[^/\\]+') do
current = current .. dir .. '/'
local info = nativefs.getInfo(current, 'directory')