Skip to content

Commit

Permalink
fix compatibility between confwatcher and legacy configuration file (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Apr 1, 2023
1 parent 053f2ec commit adbd4b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/confwatcher/confwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ type ConfWatcher struct {
// New allocates a ConfWatcher.
func New(confPath string) (*ConfWatcher, error) {
if _, err := os.Stat(confPath); err != nil {
return nil, err
if confPath == "mediamtx.yml" {
confPath = "rtsp-simple-server.yml"
if _, err := os.Stat(confPath); err != nil {
return nil, err
}
} else {
return nil, err
}
}

inner, err := fsnotify.NewWatcher()
Expand Down

0 comments on commit adbd4b7

Please sign in to comment.