confwatcher: remove redundant code (#2592)

This commit is contained in:
Alessandro Ros 2023-10-28 12:16:57 +02:00 committed by GitHub
parent 88dd8d23f4
commit f11f39f023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,14 +30,7 @@ type ConfWatcher struct {
// New allocates a ConfWatcher.
func New(confPath string) (*ConfWatcher, error) {
if _, err := os.Stat(confPath); err != nil {
if confPath == "mediamtx.yml" {
confPath = "rtsp-simple-server.yml"
if _, err := os.Stat(confPath); err != nil {
return nil, err
}
} else {
return nil, err
}
return nil, err
}
inner, err := fsnotify.NewWatcher()