mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	Fix cleanup target dir
This commit is contained in:
		| @@ -510,21 +510,20 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> { | |||||||
|             if (UpdateContext.DEBUG) { |             if (UpdateContext.DEBUG) { | ||||||
|                 e.printStackTrace(); |                 e.printStackTrace(); | ||||||
|             } |             } | ||||||
|             File targetToClean = params[0].targetFile; |  | ||||||
|             switch (taskType) { |             switch (taskType) { | ||||||
|                 case DownloadTaskParams.TASK_TYPE_PATCH_FULL: |                 case DownloadTaskParams.TASK_TYPE_PATCH_FULL: | ||||||
|                 case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK: |                 case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK: | ||||||
|                 case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK: |                 case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK: | ||||||
|                     try { |                     try { | ||||||
|                         removeDirectory(targetToClean); |                         removeDirectory(params[0].unzipDirectory); | ||||||
|                     } catch (IOException ioException) { |                     } catch (IOException ioException) { | ||||||
|                         ioException.printStackTrace(); |                         ioException.printStackTrace(); | ||||||
|                     } |                     } | ||||||
|                     break; |                     break; | ||||||
|                 case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD: |                 case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD: | ||||||
|                     if (targetToClean.exists()) { | //                    if (targetToClean.exists()) { | ||||||
|                         targetToClean.delete(); |                     params[0].targetFile.delete(); | ||||||
|                     } | //                    } | ||||||
|                     break; |                     break; | ||||||
|                 default: |                 default: | ||||||
|                     break; |                     break; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 sunnylqm
					sunnylqm