fix mount path: s/ → session/

This commit is contained in:
Levi Neely 2026-07-30 00:32:00 +02:00
parent 6e94053c5b
commit bccaf0096d
1 changed files with 5 additions and 5 deletions

10
main.go
View File

@ -33,7 +33,7 @@ func main() {
// agentBase returns the filesystem path to the active agent within a session.
// Layout: s/{sid}/agent/{aid}/
func agentBase(sid string) string {
agentDir := filepath.Join(ollie, "s", sid, "agent")
agentDir := filepath.Join(ollie, "session", sid, "agent")
entries, err := os.ReadDir(agentDir)
if err != nil {
return filepath.Join(agentDir, "0") // fallback
@ -69,7 +69,7 @@ func newSessionList() error {
}
func (sl *sessionList) refresh() {
data, err := os.ReadFile(filepath.Join(ollie, "s", "idx"))
data, err := os.ReadFile(filepath.Join(ollie, "session", "idx"))
if err != nil {
sl.win.Errf("read idx: %v", err)
return
@ -122,7 +122,7 @@ func (sl *sessionList) eventLoop() {
case 'x', 'X':
cmd := strings.TrimSpace(string(e.Text))
if cmd == "New" {
openFile(filepath.Join(ollie, "s", "new"))
openFile(filepath.Join(ollie, "session", "new"))
continue
}
if cmd == "Kill" {
@ -153,7 +153,7 @@ func (sl *sessionList) eventLoop() {
}
func sessionExists(sid string) bool {
_, err := os.Stat(filepath.Join(ollie, "s", sid))
_, err := os.Stat(filepath.Join(ollie, "session", sid))
return err == nil
}
@ -180,7 +180,7 @@ func openChat(sid string) {
return
}
winName := "ollie/sessions/" + sid
if data, err := os.ReadFile(filepath.Join(ollie, "s", "idx")); err == nil {
if data, err := os.ReadFile(filepath.Join(ollie, "session", "idx")); err == nil {
for _, line := range strings.Split(string(data), "\n") {
fields := strings.Split(line, "\t")
if len(fields) >= 3 && fields[0] == sid {