diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-02-06 21:59:06 +0100 |
|---|---|---|
| committer | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-09-29 21:32:32 +0200 |
| commit | cf81b232e1fe5140b93b2638fd5824344136bd4c (patch) | |
| tree | a498d7c3cdd825dfd48be490a20545fbbc37ff14 | |
| parent | 154a8e2e221e9b8e59b22c3a2687596f1035232f (diff) | |
| -rw-r--r-- | internal/mobius/friendship_quest_file_extensions.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/mobius/friendship_quest_file_extensions.go b/internal/mobius/friendship_quest_file_extensions.go index 98d82ff..c2d5d12 100644 --- a/internal/mobius/friendship_quest_file_extensions.go +++ b/internal/mobius/friendship_quest_file_extensions.go @@ -73,7 +73,8 @@ func handleFileTransaction(cc *hotline.ClientConn, t *hotline.Transaction, handl return nil } - resolvedPath, err := ResolveUserPath(cc, requestedPath[len(cc.FileRoot())+1:]) + sliceLen := min(len(cc.FileRoot()) + 1, len(requestedPath)) + resolvedPath, err := ResolveUserPath(cc, requestedPath[sliceLen:]) if err != nil { return cc.NewErrReply(t, errMsg) } |