aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-02-06 21:59:06 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-09-29 21:32:32 +0200
commitcf81b232e1fe5140b93b2638fd5824344136bd4c (patch)
treea498d7c3cdd825dfd48be490a20545fbbc37ff14 /internal
parent154a8e2e221e9b8e59b22c3a2687596f1035232f (diff)
Account for the rootHEADmain
Diffstat (limited to 'internal')
-rw-r--r--internal/mobius/friendship_quest_file_extensions.go3
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)
}