From 320d2666eceed11b35b1976bbb4d76ed5e539ead Mon Sep 17 00:00:00 2001 From: controlol Date: Mon, 1 Nov 2021 21:28:18 +0100 Subject: [PATCH] fix clicking the from the path bar --- src/components/fileBrowser.jsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/fileBrowser.jsx b/src/components/fileBrowser.jsx index e6ecc01..a1ae7fe 100644 --- a/src/components/fileBrowser.jsx +++ b/src/components/fileBrowser.jsx @@ -337,11 +337,8 @@ class FileBrowser extends Component { goToPath = index => { let currentPath = this.props.currentPath.split("/") - currentPath.shift() - - if (index !== currentPath.length - 1) { - - currentPath.length = index + 1 + if (index !== currentPath.length - 2) { + currentPath.length = index + 2 this.props.updateFiles(currentPath.join("/")) this.setState({filter: ""})