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 => {