mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-14 16:37:16 +03:00
Merge branch 'fixDownload' into 'develop'
Fix Download bug in Custom Locations See merge request ultrasonic/ultrasonic!847
This commit is contained in:
commit
c93ef240b4
@ -87,14 +87,10 @@ class StorageFile(
|
||||
|
||||
override fun getFileOutputStream(append: Boolean): OutputStream {
|
||||
val mode = if (append) "wa" else "w"
|
||||
val descriptor = UApp.applicationContext().contentResolver.openAssetFileDescriptor(
|
||||
return UApp.applicationContext().contentResolver.openOutputStream(
|
||||
uri,
|
||||
mode
|
||||
)
|
||||
val stream = descriptor?.createOutputStream()
|
||||
?: throw IOException("Couldn't retrieve OutputStream")
|
||||
descriptor.close()
|
||||
return stream
|
||||
) ?: throw IOException("Couldn't retrieve OutputStream")
|
||||
}
|
||||
|
||||
override fun getFileInputStream(): InputStream {
|
||||
|
Loading…
x
Reference in New Issue
Block a user