mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-11 18:00:29 +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 )
|
||||
if #tFiles > 0 then
|
||||
for n,sFile in ipairs( tFiles ) do
|
||||
if fs.exists( sDest ) == true then
|
||||
printError( "Destination exists" )
|
||||
elseif fs.isDir( sDest ) then
|
||||
if fs.isDir( sDest ) then
|
||||
fs.copy( sFile, fs.combine( sDest, fs.getName(sFile) ) )
|
||||
elseif #tFiles == 1 then
|
||||
fs.copy( sFile, sDest )
|
||||
if fs.exists( sDest ) then
|
||||
printError( "Destination exists" )
|
||||
else
|
||||
fs.copy( sFile, sDest )
|
||||
end
|
||||
else
|
||||
printError( "Cannot overwrite file multiple times" )
|
||||
return
|
||||
|
@ -6,7 +6,7 @@ end
|
||||
|
||||
local sNewDir = shell.resolve( tArgs[1] )
|
||||
|
||||
if fs.exists( sNewDir ) == true then
|
||||
if fs.exists( sNewDir ) then
|
||||
printError( "Destination exists" )
|
||||
return
|
||||
end
|
||||
|
@ -7,7 +7,7 @@ end
|
||||
local sSource = shell.resolve( tArgs[1] )
|
||||
local sDest = shell.resolve( tArgs[2] )
|
||||
|
||||
if fs.exists( sDest ) == true then
|
||||
if fs.exists( sDest ) then
|
||||
printError( "Destination exists" )
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user