mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-22 18:53:16 +00:00
Fix Bug in copy.lua, mkdir.lua and rename.lua
This commit is contained in:
parent
579f7443a8
commit
90c4ebd208
@ -10,7 +10,9 @@ local sDest = shell.resolve( tArgs[2] )
|
||||
local tFiles = fs.find( sSource )
|
||||
if #tFiles > 0 then
|
||||
for n,sFile in ipairs( tFiles ) do
|
||||
if fs.isDir( sDest ) then
|
||||
if fs.exists( sDest ) == true then
|
||||
printError( "Destination exists" )
|
||||
elseif fs.isDir( sDest ) then
|
||||
fs.copy( sFile, fs.combine( sDest, fs.getName(sFile) ) )
|
||||
elseif #tFiles == 1 then
|
||||
fs.copy( sFile, sDest )
|
||||
|
@ -5,5 +5,11 @@ if #tArgs < 1 then
|
||||
end
|
||||
|
||||
local sNewDir = shell.resolve( tArgs[1] )
|
||||
|
||||
if fs.exists( sNewDir ) == true then
|
||||
printError( "Destination exists" )
|
||||
return
|
||||
end
|
||||
|
||||
fs.makeDir( sNewDir )
|
||||
|
||||
|
@ -6,4 +6,9 @@ end
|
||||
|
||||
local sSource = shell.resolve( tArgs[1] )
|
||||
local sDest = shell.resolve( tArgs[2] )
|
||||
|
||||
if fs.exists( sDest ) == true then
|
||||
printError( "Destination exists" )
|
||||
end
|
||||
|
||||
fs.move( sSource, sDest )
|
||||
|
Loading…
x
Reference in New Issue
Block a user