mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
parent
dd5240d018
commit
0935b6f697
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user