1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-13 11:40:29 +00:00

Remove / and \ at the start of shell.setDir() (#410)

Uses fs.combine to normalise the file path. This removes leading/trailing
slashes, as well as any redundant "../"s within the path.
This commit is contained in:
JakobDev 2020-04-22 07:30:49 +02:00 committed by GitHub
parent 544f276ff0
commit f3de97d67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,7 @@ function shell.setDir(_sDir)
if not fs.isDir(_sDir) then
error("Not a directory", 2)
end
sDir = _sDir
sDir = fs.combine(_sDir, "")
end
function shell.path()