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