aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/account/icon.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-06 10:16:31 +0900
committernsfisis <nsfisis@gmail.com>2025-09-06 10:16:33 +0900
commitabb9d17e79405cbee8bb98887b457d2a7e215ba9 (patch)
tree85dd6645cda1740c51234f292fc2a7d9bb32e880 /backend/account/icon.go
parent3e77bb9ee1aabab22138de9850d8bd434eda6d91 (diff)
downloadiosdc-japan-2025-albatross-abb9d17e79405cbee8bb98887b457d2a7e215ba9.tar.gz
iosdc-japan-2025-albatross-abb9d17e79405cbee8bb98887b457d2a7e215ba9.tar.zst
iosdc-japan-2025-albatross-abb9d17e79405cbee8bb98887b457d2a7e215ba9.zip
fix(backend): duplicate slashes in some URLs
Diffstat (limited to 'backend/account/icon.go')
-rw-r--r--backend/account/icon.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/account/icon.go b/backend/account/icon.go
index 4f195c6..9e5e379 100644
--- a/backend/account/icon.go
+++ b/backend/account/icon.go
@@ -34,8 +34,8 @@ func FetchIcon(
return fmt.Errorf("failed to fetch user icon (uid=%d): %w", userID, err)
}
// Download user icon file.
- filePath := fmt.Sprintf("/files/img/%s/icon%s", url.PathEscape(user.Username), path.Ext(avatarURL))
- if err := downloadFile(ctx, fortee.Endpoint+avatarURL, "/data"+filePath); err != nil {
+ filePath := fmt.Sprintf("files/img/%s/icon%s", url.PathEscape(user.Username), path.Ext(avatarURL))
+ if err := downloadFile(ctx, fortee.Endpoint+avatarURL, "/data/"+filePath); err != nil {
return fmt.Errorf("failed to fetch user icon (uid=%d): %w", userID, err)
}
// Save user icon path.