ported apps lscor, mv, and rm
there's partially rtest too, if you count that
This commit is contained in:
+3
-2
@@ -1,4 +1,5 @@
|
||||
local fromFile, toFile = ...
|
||||
local shell = require("shell")
|
||||
local fs = require("filesystem")
|
||||
|
||||
if not fromFile or not toFile then
|
||||
@@ -6,10 +7,10 @@ if not fromFile or not toFile then
|
||||
return
|
||||
end
|
||||
if fromFile:sub(1, 1) ~= "/" then
|
||||
fromFile = fs.concat(shell.workingDirectory, fromFile)
|
||||
fromFile = fs.concat(shell.getWorkingDirectory(), fromFile)
|
||||
end
|
||||
if toFile:sub(1, 1) ~= "/" then
|
||||
toFile = fs.concat(shell.workingDirectory, toFile)
|
||||
toFile = fs.concat(shell.getWorkingDirectory(), toFile)
|
||||
end
|
||||
if fromFile == toFile then
|
||||
print("\27[91mSource and destination are the same.")
|
||||
|
||||
Reference in New Issue
Block a user