diff --git a/main.go b/main.go index 8e573f9..9fc9eed 100644 --- a/main.go +++ b/main.go @@ -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 {