()
| 74 | } |
| 75 | |
| 76 | func (s *SessionFiles) pruneMissing() { |
| 77 | kept := s.index[:0] |
| 78 | for _, r := range s.index { |
| 79 | if _, err := os.Stat(filepath.Join(s.root, r.Path)); err == nil { |
| 80 | kept = append(kept, r) |
| 81 | } |
| 82 | } |
| 83 | s.index = kept |
| 84 | } |
| 85 | |
| 86 | func (s *SessionFiles) flushIndex() error { |
| 87 | out := struct { |