From 4e9c3d97c6c758c8dcb7c3f03dffa77e1a6e8f9e Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Thu, 24 Jan 2019 21:45:10 +0000
Subject: [PATCH] Fix for changing currentDirectory.
---
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
index 4148173..698d7d4 100644
--- a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
+++ b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -96,8 +96,9 @@
.then(json => {
let currentDirectory = this.state.filter.currentDirectory;
const fileList = json;
- if (fileList && fileList.length > 0) {
+ if (fileList && fileList.length > 0 && 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)
}
this.setState({
isFetching: false,
--
Gitblit v1.10.0