mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-01-26 15:14:57 +01:00
simplify filename fetching from path
This commit is contained in:
parent
f1bb2e1656
commit
79cf72bf6c
@ -79,7 +79,7 @@ class RecorderService : Service() {
|
|||||||
try {
|
try {
|
||||||
if (!isQPlus() && isPathOnSD(currFilePath)) {
|
if (!isQPlus() && isPathOnSD(currFilePath)) {
|
||||||
var document = getDocumentFile(currFilePath.getParentPath())
|
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
|
val outputFileDescriptor = contentResolver.openFileDescriptor(document!!.uri, "w")!!.fileDescriptor
|
||||||
setOutputFile(outputFileDescriptor)
|
setOutputFile(outputFileDescriptor)
|
||||||
|
Loading…
Reference in New Issue
Block a user