fix path issue, remove debugs
This commit is contained in:
		
							parent
							
								
									803a5ba06f
								
							
						
					
					
						commit
						53a3145ce0
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -58,16 +58,16 @@ local function getAllFiles(program) | |||
|     local updateUrl = url .. "/updates/" .. program | ||||
| 
 | ||||
|     local currentFiles = "" | ||||
|     if fs.exists(path .. "indexes.dat") then | ||||
|         print("#DEBUG path " .. path .. program .. "/indexes.dat") | ||||
|     if fs.exists(path .. program .. "indexes.dat") then | ||||
|         --print("#DEBUG path " .. path .. program .. "/indexes.dat") | ||||
|         local indexesFile = fs.open(path .. program .. "/indexes.dat", "r") | ||||
|         local indexesFileText = indexesFile.readAll() | ||||
|         print("#DEBUG indexesFileText " .. indexesFileText) | ||||
|         --print("#DEBUG indexesFileText " .. indexesFileText) | ||||
|         currentFiles = indexesFileText | ||||
|         indexesFile.close() | ||||
|     end | ||||
| 
 | ||||
|     print("#DEBUG currentFiles " .. currentFiles) | ||||
|     --print("#DEBUG currentFiles " .. currentFiles) | ||||
| 
 | ||||
|     local updateResult = http.post(updateUrl, currentFiles) | ||||
|     if updateResult == nil then | ||||
|  | @ -75,7 +75,7 @@ local function getAllFiles(program) | |||
|         error() | ||||
|     end | ||||
|     local updateText = updateResult.readAll() | ||||
|     print("#DEBUG updateText" .. updateText) | ||||
|     --print("#DEBUG updateText" .. updateText) | ||||
|     local updateTable = split(updateText, "\n") | ||||
| 
 | ||||
|     local indexesResult = http.get(indexesUrl) | ||||
|  | @ -84,7 +84,7 @@ local function getAllFiles(program) | |||
|         error() | ||||
|     end | ||||
|     local indexesText = indexesResult.readAll() | ||||
|     print("#DEBUG indexesText" .. indexesText) | ||||
|     --print("#DEBUG indexesText" .. indexesText) | ||||
|     local indexesTable = split(indexesText, "\n") | ||||
| 
 | ||||
|     local newIndexesFile = fs.open(path .. program .. "/indexes.dat", "w") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue