From 554b4f3b56f97ea0cac3014a413a5c471f9c59c5 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 3 Jul 2020 17:19:42 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=99=A8=E4=B8=8A=E4=BC=A0/=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=90=8E=E6=97=A0=E6=B3=95=E8=87=AA=E5=AE=9A=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/ssh/FileManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spug_web/src/pages/ssh/FileManager.js b/spug_web/src/pages/ssh/FileManager.js index 5b98624..ce1c030 100644 --- a/spug_web/src/pages/ssh/FileManager.js +++ b/spug_web/src/pages/ssh/FileManager.js @@ -72,7 +72,7 @@ class FileManager extends React.Component { onShow = (visible) => { if (visible) { - this.fetchFiles(this.state.pwd) + this.fetchFiles() } }; @@ -82,6 +82,7 @@ class FileManager extends React.Component { fetchFiles = (pwd) => { this.setState({fetching: true}); + pwd = pwd || this.state.pwd; const path = '/' + pwd.join('/'); http.get('/api/file/', {params: {id: this.id, path}}) .then(res => {