aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_conn.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-19 21:31:42 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-19 21:40:38 -0700
commitdcd23d5355badf66c34ffd63d3c44734e87ebf17 (patch)
treeeac7ec135e1e06ac8f4e9cb6aa0e04d392d1d69d /hotline/client_conn.go
parent9f89cd9fbbcec9f7f42c87ee0adc21427aab9f1c (diff)
Add option for account-specific file root
Diffstat (limited to 'hotline/client_conn.go')
-rw-r--r--hotline/client_conn.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/hotline/client_conn.go b/hotline/client_conn.go
index 060a2b9..d324591 100644
--- a/hotline/client_conn.go
+++ b/hotline/client_conn.go
@@ -42,6 +42,13 @@ type ClientConn struct {
mu sync.RWMutex
}
+func (cc *ClientConn) FileRoot() string {
+ if cc.Account.FileRoot != "" {
+ return cc.Account.FileRoot
+ }
+ return cc.Server.Config.FileRoot
+}
+
type ClientFileTransferMgr struct {
transfers map[FileTransferType]map[FileTransferID]*FileTransfer