simplify filename fetching from path
This commit is contained in:
parent
f1bb2e1656
commit
79cf72bf6c
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ class RecorderService : Service() {
|
|||
try {
|
||||
if (!isQPlus() && isPathOnSD(currFilePath)) {
|
||||
var document = getDocumentFile(currFilePath.getParentPath())
|
||||
document = document?.createFile("", currFilePath.substring(currFilePath.lastIndexOf('/') + 1))
|
||||
document = document?.createFile("", currFilePath.getFilenameFromPath())
|
||||
|
||||
val outputFileDescriptor = contentResolver.openFileDescriptor(document!!.uri, "w")!!.fileDescriptor
|
||||
setOutputFile(outputFileDescriptor)
|
||||
|
|
Loading…
Reference in a new issue