mirror of https://github.com/micromata/borgbackup-butler.git

Fin Reinhard
24.19.2019 28456794ec17181758f55e67f744ab2bbe4cf82d
fixing url step into sub dirs
1 files modified
12 ■■■■ changed files
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx 12 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -96,11 +96,17 @@
            .then(json => {
                let currentDirectory = this.state.filter.currentDirectory;
                const fileList = json;
                if (fileList && fileList.length === 1 && fileList[0] && fileList[0].path) {
                if (fileList && fileList.length > 0 && fileList[0] && fileList[0].path) {
                    currentDirectory = fileList[0].path.replace(fileList[0].displayPath, '');
                    const newUrl = `${this.props.match.url}/${fileList[0].path}/`;
                    let newUrl = this.props.match.url;
                    if (currentDirectory) {
                        newUrl += `/${currentDirectory}`;
                    }
                    if (newUrl !== this.props.location.pathname) {
                        this.props.history.push(`${this.props.match.url}/${fileList[0].path}/`);
                        this.props.history.push(newUrl);
                    }
                }
                this.setState({