mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-18 06:05:12 +00:00
Improvements to the various file system programs (rm, mv, rename) (#440)
This enforces several sanity checks before actually attempting the move, allowing us to produce friendlier error messages.
This commit is contained in:
@@ -797,6 +797,12 @@ function fs.complete(sPath, sLocation, bIncludeFiles, bIncludeDirs)
|
||||
return tEmpty
|
||||
end
|
||||
|
||||
function fs.isDriveRoot(sPath)
|
||||
expect(1, sPath, "string")
|
||||
-- Force the root directory to be a mount.
|
||||
return fs.getDir(sPath) == ".." or fs.getDrive(sPath) ~= fs.getDrive(fs.getDir(sPath))
|
||||
end
|
||||
|
||||
-- Load APIs
|
||||
local bAPIError = false
|
||||
local tApis = fs.list("rom/apis")
|
||||
|
||||
Reference in New Issue
Block a user