mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-03-27 13:50:22 -06:00
DocumentsTree: Re-implement getFilename without resolvePath
This commit is contained in:
parent
c71b2dc822
commit
fac63ce6b1
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user