diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-01-08 21:57:39 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-01-08 21:57:39 +1100 |
commit | c3d54f3c2eba2be47695427f59c22844a6dba7fd (patch) | |
tree | 87814bd3216dc1a94d65c968f60bd342b15d343d /pkg/gui/file_watching.go | |
parent | c7d367a791bf305b88dabf5a345f4f5e915ff2ed (diff) |
don't watch deleted files
Diffstat (limited to 'pkg/gui/file_watching.go')
-rw-r--r-- | pkg/gui/file_watching.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gui/file_watching.go b/pkg/gui/file_watching.go index b7ac080f6..7a56a1e81 100644 --- a/pkg/gui/file_watching.go +++ b/pkg/gui/file_watching.go @@ -77,6 +77,9 @@ func (w *fileWatcher) addFilesToFileWatcher(files []*commands.File) error { } for _, file := range files[0:min(MAX_WATCHED_FILES, len(files))] { + if file.Deleted { + continue + } filename := filepath.Join(dirName, file.Name) if w.watchingFilename(filename) { continue |