mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Truncate existing file in export
This commit is contained in:
		| @@ -46,7 +46,8 @@ class SubscriptionExportWorker( | |||||||
|             setForeground(createForegroundInfo(title)) |             setForeground(createForegroundInfo(title)) | ||||||
|  |  | ||||||
|             withContext(Dispatchers.IO) { |             withContext(Dispatchers.IO) { | ||||||
|                 applicationContext.contentResolver.openOutputStream(uri)?.use { |                 // Truncate file if it already exists | ||||||
|  |                 applicationContext.contentResolver.openOutputStream(uri, "wt")?.use { | ||||||
|                     ImportExportJsonHelper.writeTo(subscriptions, it) |                     ImportExportJsonHelper.writeTo(subscriptions, it) | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Isira Seneviratne
					Isira Seneviratne