@samitouri / QOSami-HFS / commits / 5435dd38

fix: admin/fs: folder displayed as "." #782

Massimo Melina committed Oct 18, 2024 at 09:55 UTC 5435dd3870f20cc8e00d12f4cc4889d3f6b3581b
1 file changed +1 -1
admin/src/VfsTree.ts
+1 -1
@@ -102,7 +102,7 @@ export default function VfsTree({ id2node, statusApi }:{ id2node: Map<string, Vf
102 isRoot ? "Home" : (() => { // special rendering if the whole source is not too long, and the name was not customized
103 const ps = node.parent?.source
104 const { source } = node
105 - const rel = ps && source?.startsWith(ps) ? '.' + source.slice(ps.length) : source
105 + const rel = ps && source?.startsWith(ps) && source > ps ? '.' + source.slice(ps.length) : source
106 return !rel || !source?.endsWith(name) || rel.length > 45 ? name
107 : h('span', {},
108 h('span', { style: { opacity: .4, fontSize: 'small' } }, rel.slice(0,-name.length)),