mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-01-10 16:04:37 +01:00
simplify filename fetching from path
This commit is contained in:
parent
f1bb2e1656
commit
79cf72bf6c
@ -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 New Issue
Block a user