forked from hardcoresushi/DroidFS
Fix EncryptedVolumeDataSource EOF
This commit is contained in:
parent
d2f11c85d1
commit
5dbef99949
@ -50,7 +50,11 @@ class EncryptedVolumeDataSource(private val encryptedVolume: EncryptedVolume, pr
|
|||||||
) {}
|
) {}
|
||||||
val totalRead = fileOffset-originalOffset
|
val totalRead = fileOffset-originalOffset
|
||||||
bytesRemaining -= totalRead
|
bytesRemaining -= totalRead
|
||||||
return totalRead.toInt()
|
return if (totalRead == 0L) {
|
||||||
|
C.RESULT_END_OF_INPUT
|
||||||
|
} else {
|
||||||
|
totalRead.toInt()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Factory(private val encryptedVolume: EncryptedVolume, private val filePath: String): DataSource.Factory {
|
class Factory(private val encryptedVolume: EncryptedVolume, private val filePath: String): DataSource.Factory {
|
||||||
|
Loading…
Reference in New Issue
Block a user