mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-27 01:14:46 +00:00
Changes requested by dan200
This commit is contained in:
parent
90c4ebd208
commit
1415dd0dae
@ -10,12 +10,14 @@ local sDest = shell.resolve( tArgs[2] )
|
|||||||
local tFiles = fs.find( sSource )
|
local tFiles = fs.find( sSource )
|
||||||
if #tFiles > 0 then
|
if #tFiles > 0 then
|
||||||
for n,sFile in ipairs( tFiles ) do
|
for n,sFile in ipairs( tFiles ) do
|
||||||
if fs.exists( sDest ) == true then
|
if fs.isDir( sDest ) then
|
||||||
printError( "Destination exists" )
|
|
||||||
elseif fs.isDir( sDest ) then
|
|
||||||
fs.copy( sFile, fs.combine( sDest, fs.getName(sFile) ) )
|
fs.copy( sFile, fs.combine( sDest, fs.getName(sFile) ) )
|
||||||
elseif #tFiles == 1 then
|
elseif #tFiles == 1 then
|
||||||
|
if fs.exists( sDest ) then
|
||||||
|
printError( "Destination exists" )
|
||||||
|
else
|
||||||
fs.copy( sFile, sDest )
|
fs.copy( sFile, sDest )
|
||||||
|
end
|
||||||
else
|
else
|
||||||
printError( "Cannot overwrite file multiple times" )
|
printError( "Cannot overwrite file multiple times" )
|
||||||
return
|
return
|
||||||
|
@ -6,7 +6,7 @@ end
|
|||||||
|
|
||||||
local sNewDir = shell.resolve( tArgs[1] )
|
local sNewDir = shell.resolve( tArgs[1] )
|
||||||
|
|
||||||
if fs.exists( sNewDir ) == true then
|
if fs.exists( sNewDir ) then
|
||||||
printError( "Destination exists" )
|
printError( "Destination exists" )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ end
|
|||||||
local sSource = shell.resolve( tArgs[1] )
|
local sSource = shell.resolve( tArgs[1] )
|
||||||
local sDest = shell.resolve( tArgs[2] )
|
local sDest = shell.resolve( tArgs[2] )
|
||||||
|
|
||||||
if fs.exists( sDest ) == true then
|
if fs.exists( sDest ) then
|
||||||
printError( "Destination exists" )
|
printError( "Destination exists" )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user