1
0
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:
Wilma456 2017-09-12 20:43:07 +02:00
parent 90c4ebd208
commit 1415dd0dae
3 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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