mirror of
				https://github.com/packwiz/packwiz-installer.git
				synced 2025-11-04 12:34:31 +01:00 
			
		
		
		
	Fix exception when old file doesn't exist
This commit is contained in:
		@@ -188,7 +188,12 @@ internal class DownloadTask private constructor(val metadata: IndexFile.File, de
 | 
			
		||||
			cachedFile?.cachedLocation?.let {
 | 
			
		||||
				if (destPath != Paths.get(packFolder, it)) {
 | 
			
		||||
					// Delete old file if location changes
 | 
			
		||||
					Files.delete(Paths.get(packFolder, cachedFile!!.cachedLocation))
 | 
			
		||||
					try {
 | 
			
		||||
						Files.delete(Paths.get(packFolder, cachedFile!!.cachedLocation))
 | 
			
		||||
					} catch (e: IOException) {
 | 
			
		||||
						// Continue, as it was probably already deleted?
 | 
			
		||||
						// TODO: log it
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		} catch (e: Exception) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user