mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 10:51:55 -04:00
Fixed fs.path returning double slash for elements in root.
This commit is contained in:
parent
3ef3413586
commit
d3560d17b6
@ -228,7 +228,7 @@ end
|
||||
function filesystem.path(path)
|
||||
local parts = segments(path)
|
||||
local result = table.concat(parts, "/", 1, #parts - 1) .. "/"
|
||||
if unicode.sub(path, 1, 1) == "/" then
|
||||
if unicode.sub(path, 1, 1) == "/" and unicode.sub(result, 1, 1) ~= "/" then
|
||||
return "/" .. result
|
||||
else
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user