mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Merge pull request #274 from BinaryAlley/bugfix/fix-unix-tree-view-path-expansion
Fixes file system browser tree view path expansion on UNIX
This commit is contained in:
1 file changed
+2
-2
@@ -823,8 +823,8 @@
|
|||||||
const expandButton = node.querySelector('.expand-button');
|
const expandButton = node.querySelector('.expand-button');
|
||||||
if (expandButton && !expandButton.classList.contains('expanded'))
|
if (expandButton && !expandButton.classList.contains('expanded'))
|
||||||
await toggleFileSysemTreeViewNodeExpandAsync({ target: expandButton, stopPropagation: () => { } });
|
await toggleFileSysemTreeViewNodeExpandAsync({ target: expandButton, stopPropagation: () => { } });
|
||||||
// split the remaining path into segments
|
// split the remaining path into segments, using the separator of the file system the browser is showing
|
||||||
const pathSegments = targetPath.slice(nodePath.length).split('\\').filter(Boolean);
|
const pathSegments = targetPath.slice(nodePath.length).split(pathSeparator).filter(Boolean);
|
||||||
let currentNode = node;
|
let currentNode = node;
|
||||||
// iterate through each path segment
|
// iterate through each path segment
|
||||||
for (let i = 0; i < pathSegments.length; i++) {
|
for (let i = 0; i < pathSegments.length; i++) {
|
||||||
|
|||||||
Reference in new issue
Block a user