From b6ccff9ae02b8c6a5bc46344a8bd1b4774a7f4da Mon Sep 17 00:00:00 2001
From: Fin Reinhard <fin.reinhard@icloud.com>
Date: Thu, 24 Jan 2019 22:36:41 +0000
Subject: [PATCH] fixing double refetch when force step into multiple dirs

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

diff --git a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
index 5d062b8..1f07c50 100644
--- a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
+++ b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -42,6 +42,10 @@
     }
 
     handleURLChange = location => {
+        if (location.state && location.state.noReFetch) {
+            return;
+        }
+
         // Replacing matched URL(archiveId, repoId) and removing trailing slashes
         this.changeCurrentDirectory(location.pathname.replace(this.props.match.url, '').replace(/^\/|\/$/g, ''));
     };
@@ -108,7 +112,7 @@
                     }
 
                     if (newUrl !== this.props.location.pathname) {
-                        this.props.history.push(newUrl);
+                        this.props.history.push(newUrl, {noReFetch: true});
                     }
                 }
                 this.setState({

--
Gitblit v1.10.0