mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-06-28 16:13:02 +00:00
Truncate existing file in export
This commit is contained in:
parent
af3ed992e5
commit
32a88ab890
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user