1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #10672: External editing: Fix notes often not updated when saved from Vim (#10780)

This commit is contained in:
Henry Heino 2024-07-26 04:39:21 -07:00 committed by GitHub
parent dd5240d018
commit 0935b6f697
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,17 +159,6 @@ export default class ExternalEditWatcher {
this.logger().error('ExternalEditWatcher: error');
}
});
// Hack to support external watcher on some linux applications (gedit, gvim, etc)
// taken from https://github.com/paulmillr/chokidar/issues/591
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
this.watcher_.on('raw', async (event: string, _path: string, options: any) => {
const watchedPath: string = options.watchedPath;
this.logger().debug(`ExternalEditWatcher: Raw event: ${event}: ${watchedPath}`);
if (event === 'rename') {
this.watcher_.unwatch(watchedPath);
this.watcher_.add(watchedPath);
}
});
} else {
this.watcher_.add(fileToWatch);
}