Skip to content

Commit

Permalink
Merged pull request #1228 from sj14/master
Browse files Browse the repository at this point in the history
check if replay file has an extension
  • Loading branch information
nathanielc committed Feb 27, 2017
2 parents d57e7ba + 8e3c429 commit cfbbd88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
we decided it would be best to fix the issue now and make it consistent for all future builds.
Specifically in the JSON result data the old key `Series` is always `series`, and the old key `Err` is now always `error` instead of for only some of the outputs.
- [#1181](https://github.com/influxdata/kapacitor/pull/1181): Fix bug parsing dbrp values with quotes.

- [#1228](https://github.com/influxdata/kapacitor/pull/1228): Fix panic on loading replay files without a file extension.

## v1.2.0 [2017-01-23]

Expand Down
4 changes: 4 additions & 0 deletions services/replay/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ func (s *Service) syncRecordingMetadata() error {
}
name := info.Name()
i := strings.LastIndex(name, ".")
if i == -1 {
s.logger.Println("E! file without extension in replay dir", name)
continue
}
ext := name[i:]
id := name[:i]

Expand Down

0 comments on commit cfbbd88

Please sign in to comment.