You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Several changes for using MediaStore
- Change config key name so default downloads to folder 'Download' - Always use getFile as we do not need existing file deleted - Fallback to use File based I/O pre API 29 as officially MediaStore APIs do not support general purpose usage. And also, it was working fine on all devices before. If it ain't broke, don't fix it - Show full download path in settings to make it more clear to the user - Close streams after using them
This commit is contained in:
@@ -21,7 +21,8 @@ fun ZipInputStream.forEach(callback: (ZipEntry) -> Unit) {
|
||||
}
|
||||
}
|
||||
|
||||
fun InputStream.writeTo(file: File) = this.copyTo(file.outputStream())
|
||||
fun InputStream.writeTo(file: File) =
|
||||
withStreams(this, file.outputStream()) { reader, writer -> reader.copyTo(writer) }
|
||||
|
||||
inline fun <In : InputStream, Out : OutputStream> withStreams(
|
||||
inStream: In,
|
||||
|
||||
Reference in New Issue
Block a user