fix clicking the from the path bar

This commit is contained in:
controlol 2021-11-01 21:28:18 +01:00
parent 613817fc46
commit 320d2666ec

View File

@ -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: ""})