diff --git a/nativefs.lua b/nativefs.lua index 6d19da1..339159b 100644 --- a/nativefs.lua +++ b/nativefs.lua @@ -292,7 +292,7 @@ end function nativefs.createDirectory(path) local current = '' for dir in path:gmatch('[^/\\]+') do - current = (current == '' and current or current .. '/') .. dir + current = current .. dir .. '/' local info = nativefs.getInfo(current, 'directory') if not info and not mkdir(current) then return false, "Could not create directory " .. current end end