mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-06-29 08:32:57 +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))
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user