Unwatch directory

This commit is contained in:
Yasuhiro Matsumoto
2022-05-07 00:59:30 +09:00
committed by Ben Johnson
parent 2c0dce21fa
commit 7d0167f10a

View File

@@ -137,7 +137,7 @@ func (s *Server) Unwatch(path string) error {
delete(s.dbs, path)
// Stop watching for changes on the database WAL.
if err := s.watcher.Remove(path + "-wal"); err != nil {
if err := s.watcher.Remove(filepath.Dir(path)); err != nil {
return fmt.Errorf("unwatch file: %w", err)
}