fix: Linux rename syscall when using side bar (#845)

This commit is contained in:
Felix Häusler 2019-04-03 04:36:27 +02:00 committed by Ran Luo
parent 21e6ebc1ff
commit c5852252aa

View File

@ -109,7 +109,7 @@ class Watcher {
}
// rename syscall on Linux (chokidar#591)
if (isLinux && event === 'rename') {
if (isLinux && type === 'file' && event === 'rename') {
const { watchedPath } = details
// Use the same watcher and re-watch the file.
watcher.unwatch(watchedPath)