luci-base: ui: fix path handling in UIFileUpload
authorPaul Donald <[email protected]>
Thu, 20 Mar 2025 16:20:08 +0000 (17:20 +0100)
committerPaul Donald <[email protected]>
Thu, 20 Mar 2025 16:21:33 +0000 (17:21 +0100)
commit5e39cf04c41e5a656e612aa36f75ce47211defee
tree31ec0e21083a0b62af8b822adff9fda221b0f19b
parent70aa0bea68fae83bc8682fdc62aa198fe3e40634
luci-base: ui: fix path handling in UIFileUpload

Browsing the root path was problematic and the breadcrumb links behaved
inconsistently, requiring a page reload to recover.

canonicalizePath(), splitPath() and renderListing() now handle any path
location properly, including root: '/', and clicks at any breadcrumb
correctly navigate.

Signed-off-by: Paul Donald <[email protected]>
modules/luci-base/htdocs/luci-static/resources/ui.js