This commit is contained in:
kepler155c@gmail.com
2019-03-12 20:04:28 -04:00
parent 86be65f026
commit e2508c9037
5 changed files with 20 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ local function splitpath(path)
end
local function getNode(dir)
if not dir then error('Invalid directory', 2) end
local cd = fs.combine(dir, '')
local parts = splitpath(cd)
local node = fs.nodes
@@ -176,6 +177,8 @@ function fs.listEx(dir)
end
function fs.copy(s, t)
if not s then error('copy: bad argument #1') end
if not t then error('copy: bad argument #2') end
local sp = getNode(s)
local tp = getNode(t)
if sp == tp and sp.fs.copy then