added handling invalid invoke functions and ported a couple of apps
stopped component.invoke from throwing a cryptic error, and ported over cat, cd, clear, cp, edit, ls, lsdrv, and mkdir
This commit is contained in:
@@ -2,11 +2,11 @@ local directory = ...
|
||||
local fs = require("filesystem")
|
||||
|
||||
if not directory then
|
||||
shell.run("help mkdir")
|
||||
require("shell").run("help mkdir")
|
||||
return
|
||||
end
|
||||
if directory:sub(1, 1) ~= "/" then
|
||||
directory = fs.concat(shell.workingDirectory, directory)
|
||||
directory = fs.concat(require("shell").getWorkingDirectory(), directory)
|
||||
end
|
||||
if fs.exists(directory) then
|
||||
print("\27[91mAn object already exists at the specified path.")
|
||||
|
||||
Reference in New Issue
Block a user