mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-06-05 21:59:31 +02:00
simplify filename fetching from path
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user