mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-05 03:22:53 +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:
parent
544f276ff0
commit
f3de97d67f
@ -194,7 +194,7 @@ function shell.setDir(_sDir)
|
|||||||
if not fs.isDir(_sDir) then
|
if not fs.isDir(_sDir) then
|
||||||
error("Not a directory", 2)
|
error("Not a directory", 2)
|
||||||
end
|
end
|
||||||
sDir = _sDir
|
sDir = fs.combine(_sDir, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
function shell.path()
|
function shell.path()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user