From b0fea8bef3cbccde70ec5fb0891349a80a3e7f15 Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Thu, 24 Jan 2019 22:35:51 +0000
Subject: [PATCH] Fix: currentDirectory modification.

---
 borgbutler-webapp/src/components/views/archives/FileListPanel.jsx |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
index 3e5f0cd..5d062b8 100644
--- a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
+++ b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -97,7 +97,9 @@
                 let currentDirectory = this.state.filter.currentDirectory;
                 const fileList = json;
                 if (fileList && fileList.length > 0 && fileList[0] && fileList[0].path) {
-                    currentDirectory = fileList[0].path.replace(fileList[0].displayPath, '');
+                    const path = fileList[0].path;
+                    currentDirectory = path.substring(0, path.length - fileList[0].displayPath.length);
+                    //console.log(fileList[0].path + ", displayPath=" + fileList[0].displayPath + " -> " + currentDirectory);
 
                     let newUrl = this.props.match.url;
 

--
Gitblit v1.10.0