From 088ff4d69657060e3cecc93f431fd1816d320138 Mon Sep 17 00:00:00 2001 From: KernelDeimos <7225168+KernelDeimos@users.noreply.github.com> Date: Fri, 26 Sep 2025 18:41:37 -0400 Subject: [PATCH] fix: update path when renaming during save_account We do update the path of all child directories by calling filesystem.update_child_paths(), but this was never done for the user's actual home directory itself (only everything under it). The most ideal solution would be to delegate this behavior to the move operation instead of updating the fsentries table directly, but making this change right now has a high risk of breaking changes since this the behavior in this file is very old. --- src/backend/src/routers/save_account.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/src/routers/save_account.js b/src/backend/src/routers/save_account.js index f7f438a50..d4babd6ad 100644 --- a/src/backend/src/routers/save_account.js +++ b/src/backend/src/routers/save_account.js @@ -160,10 +160,11 @@ router.post('/save_account', auth, express.json(), async (req, res, next)=>{ // Update root directory name await db.write( - `UPDATE fsentries SET name = ? WHERE user_id = ? and parent_uid IS NULL`, + `UPDATE fsentries SET name = ?, path = ? WHERE user_id = ? and parent_uid IS NULL`, [ // name req.body.username, + '/' + req.body.username, // id req.user.id, ]