diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2024-07-19 21:31:42 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2024-07-19 21:40:38 -0700 |
| commit | dcd23d5355badf66c34ffd63d3c44734e87ebf17 (patch) | |
| tree | eac7ec135e1e06ac8f4e9cb6aa0e04d392d1d69d /hotline/client_conn.go | |
| parent | 9f89cd9fbbcec9f7f42c87ee0adc21427aab9f1c (diff) | |
Add option for account-specific file root
Diffstat (limited to 'hotline/client_conn.go')
| -rw-r--r-- | hotline/client_conn.go | 7 |
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 |