(v any)
| 845 | clean = strings.Trim(clean, "._-") |
| 846 | if clean == "" { |
| 847 | return fallback |
| 848 | } |
| 849 | return clean |
| 850 | } |
| 851 | |
| 852 | func sessionSQLitePath(sessionDir, sessionID, agentID string) string { |
| 853 | return filepath.Join(sessionDir, safeSessionID(sessionID), safeAgentID(agentID)+".sqlite") |
| 854 | } |
| 855 | |
| 856 | func migrateLegacySQLite(sessionDir, sessionID, agentID, targetPath string) error { |
| 857 | if safeAgentID(agentID) != "session" { |
| 858 | return os.MkdirAll(filepath.Dir(targetPath), 0o755) |
| 859 | } |
| 860 | legacyPath := filepath.Join(sessionDir, safeSessionID(sessionID)+".sqlite") |
no outgoing calls
no test coverage detected