Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions store/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (m *File) cleanup() {

// load the data from the file system.
func (m *File) load() error {
if _, err := os.Stat(m.cfg.Path); os.IsExist(err) {
if _, err := os.Stat(m.cfg.Path); err == nil {
x := struct {
Rooms map[string]*room
Data map[string][]byte
Expand Down Expand Up @@ -158,7 +158,7 @@ func (m *File) GetRoom(id string) (store.Room, error) {
out, ok := m.rooms[id]

if !ok {
return out.Room, store.ErrRoomNotFound
return store.Room{}, store.ErrRoomNotFound
}
return out.Room, nil
}
Expand Down
2 changes: 1 addition & 1 deletion store/mem/mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (m *InMemory) GetRoom(id string) (store.Room, error) {
out, ok := m.rooms[id]

if !ok {
return out.Room, store.ErrRoomNotFound
return store.Room{}, store.ErrRoomNotFound
}
return out.Room, nil
}
Expand Down