[Android] Fix getFileNameFromPath

Geoffrey Métais git at videolan.org
Tue Apr 28 12:08:27 CEST 2020


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 28 11:04:48 2020 +0200| [5ec61f030b4e9fa9fa68ced8e648d3669d832741] | committer: Geoffrey Métais

Fix getFileNameFromPath

> https://code.videolan.org/videolan/vlc-android/commit/5ec61f030b4e9fa9fa68ced8e648d3669d832741
---

 application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
index 3306ecd1a..8e1159c58 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
@@ -65,7 +65,7 @@ object FileUtils {
         fun onResult(success: Boolean)
     }
 
-    fun getFileNameFromPath(filePath: String?) =  filePath?.substringBeforeLast('/') ?: ""
+    fun getFileNameFromPath(filePath: String?) =  filePath?.substringAfterLast('/') ?: ""
 
     fun getParent(path: String?): String? {
         if (path == null || TextUtils.equals("/", path))



More information about the Android mailing list