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

Fin Reinhard
24.02.2019 bc140b98802a4aad9af8fbb7182a637677506233
changing url when steping into multiple sub directories
1 files modified
7 ■■■■ changed files
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx 7 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -96,9 +96,12 @@
            .then(json => {
                let currentDirectory = this.state.filter.currentDirectory;
                const fileList = json;
                if (fileList && fileList.length > 0 && fileList[0] && fileList[0].path) {
                if (fileList && fileList.length === 1 && fileList[0] && fileList[0].path) {
                    currentDirectory = fileList[0].path.replace(fileList[0].displayPath, '');
                    console.log("path=" + fileList[0].path + ", displayPath=" + fileList[0].displayPath + "-> currentDirectory=" + currentDirectory)
                    const newUrl = `${this.props.match.url}/${fileList[0].path}/`;
                    if (newUrl !== this.props.location.pathname) {
                        this.props.history.push(`${this.props.match.url}/${fileList[0].path}/`);
                    }
                }
                this.setState({
                    isFetching: false,