From 63eb9b1bb600d8ec938c76f69b280a84b7c5b6dc Mon Sep 17 00:00:00 2001 From: qwqVictor Date: Sat, 4 May 2024 15:29:58 +0800 Subject: [PATCH] fix: add prefix / for filePath --- filegateway/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filegateway/index.js b/filegateway/index.js index 5dba096..9f1d905 100644 --- a/filegateway/index.js +++ b/filegateway/index.js @@ -53,7 +53,7 @@ app.get("/:sessionId/:shareName/*", async (req, res) => { /** * @type {string} */ - const filePath = req.params[0]; + const filePath = "/" + req.params[0]; const session = sessionPool.getSession(sessionId); const tree = await utility.getTree(session, shareName); @@ -84,7 +84,7 @@ app.post("/:sessionId/:shareName/*", async (req, res) => { /** * @type {string} */ - const filePath = req.params[0]; + const filePath = "/" + req.params[0]; const session = sessionPool.getSession(sessionId); const tree = await utility.getTree(session, shareName); @@ -130,7 +130,7 @@ app.put("/:sessionId/:shareName/*", async (req, res) => { /** * @type {string} */ - const filePath = req.params[0]; + const filePath = "/" + req.params[0]; const session = sessionPool.getSession(sessionId); const tree = await utility.getTree(session, shareName);