delete old files before move
This commit is contained in:
		
							parent
							
								
									90200750cc
								
							
						
					
					
						commit
						8c2d3acdec
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		|  | @ -85,9 +85,15 @@ local function finishInstall(files) | |||
|     for key, file in ipairs(files) do | ||||
|         if customPath ~= nil then | ||||
|             print("moving " .. file .. " to " .. customPath .. "...") | ||||
|             if fs.exists(customPath .. "/" .. file) then | ||||
|               fs.delete(customPath .. "/" .. file) | ||||
|             end | ||||
|             fs.move(temp .. file, customPath .. "/" .. file) | ||||
|         else | ||||
|             print("moving " .. file .. " to " .. path .. programToInstall .. "...") | ||||
|             if fs.exists(path .. programToInstall .. "/" .. file) then | ||||
|               fs.delete(path .. programToInstall .. "/" .. file) | ||||
|             end | ||||
|             fs.move(temp .. file, path .. programToInstall .. "/" .. file) | ||||
|         end | ||||
|     end | ||||
|  |  | |||
|  | @ -102,9 +102,15 @@ local function finishInstall(files) | |||
|     for key, file in ipairs(files) do | ||||
|         if customPath ~= nil then | ||||
|             print("moving " .. file .. " to " .. customPath .. "...") | ||||
|             if fs.exists(customPath .. "/" .. file) then | ||||
|               fs.delete(customPath .. "/" .. file) | ||||
|             end | ||||
|             fs.move(temp .. file, customPath .. "/" .. file) | ||||
|         else | ||||
|             print("moving " .. file .. " to " .. path .. programToInstall .. "...") | ||||
|             if fs.exists(path .. programToInstall .. "/" .. file) then | ||||
|               fs.delete(path .. programToInstall .. "/" .. file) | ||||
|             end | ||||
|             fs.move(temp .. file, path .. programToInstall .. "/" .. file) | ||||
|         end | ||||
|     end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue