Merge pull request #12488 from mharbison72/filesd-windows-watcher

Fix path handling in File-SD watcher to allow directory monitoring on…
This commit is contained in:
Julien Pivotto 2023-06-25 17:36:56 +02:00 committed by GitHub
commit 446dff01ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,8 +226,8 @@ func (d *Discovery) watchFiles() {
panic("no watcher configured") panic("no watcher configured")
} }
for _, p := range d.paths { for _, p := range d.paths {
if idx := strings.LastIndex(p, "/"); idx > -1 { if dir, _ := filepath.Split(p); dir != "" {
p = p[:idx] p = dir
} else { } else {
p = "./" p = "./"
} }