aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/Search/Response.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/web/src/components/Search/Response.js b/src/web/src/components/Search/Response.js
index f8228106..239ab272 100644
--- a/src/web/src/components/Search/Response.js
+++ b/src/web/src/components/Search/Response.js
@@ -61,9 +61,14 @@ class Response extends Component {
};
getFullDirectory = async (username, directory) => {
- const directoryContents = await getDirectoryContents({ username, directory });
+ const { name, files } = await getDirectoryContents({ username, directory });
+ files.forEach((file, index) => {
+ const newFilename = `${directory}\\${file.filename}`;
+ files[index] = { ...files[index], filename: newFilename };
+ });
+
const newTree = this.state.tree;
- newTree[directoryContents.name] = directoryContents.files;
+ newTree[name] = files;
this.setState({ tree: { ...newTree } });
};