file: dedupe leading "/" when no root is set

This commit is contained in:
jean-emmanuel 2026-03-26 18:36:27 +01:00
parent d9c23bc672
commit dfe45cac01

View file

@ -143,11 +143,9 @@ export default function UiFilebrowser(options, callback) {
document.addEventListener('keydown', keyDownHandler)
ipc.on('listDir', (data)=>{
path = data.path
root = data.root
ariane.textContent = path.replace(root, '/')
ariane.textContent = root ? path.replace(root, '/') : path
files = data.files.filter(x=>x.folder || x.name.match(extRe))