DocumentsTree: Re-implement getFilename without resolvePath

This commit is contained in:
OpenSauce04 authored and OpenSauce committed 2026-03-08 18:46:09 +00:00
1 parent c71b2dc822
commit fac63ce6b1
1 file changed
+3 -2
@@ -77,8 +77,9 @@ class DocumentsTree {
@Synchronized
fun getFilename(filepath: String): String {
val node = resolvePath(filepath) ?: return ""
return node.name
val components = filepath.split(DELIMITER).filter { it.isNotEmpty() }
val filename = components.last()
return filename
}
@Synchronized