diff options
author | Phoenamandre <phoenamandre@gmail.com> | 2018-02-02 00:38:05 +0300 |
---|---|---|
committer | Phoenamandre <phoenamandre@gmail.com> | 2018-02-02 00:38:05 +0300 |
commit | 6fc3c5e1102ddc75aea59c89abbe8c4bc80a8dd7 (patch) | |
tree | 2df9cf664786dc8e85b2e47d4edf1b7cf5311eec /main.js | |
parent | 3da360154a8df8360651758c6c8f33c5b19a1eb0 (diff) |
waiting for file to be entirely writen
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -58,11 +58,12 @@ function createWindow() { //observe - + var chokidar = require('chokidar'); var watcher = chokidar.watch(exports.getNotePath() + "/quickdoc/recentdb/", { ignored: /^\./, - persistent: true + persistent: true, + awaitWriteFinish: true }); watcher .on('add', function (path) { @@ -79,7 +80,8 @@ function createWindow() { }) var watcher = chokidar.watch(exports.getNotePath() + "/quickdoc/keywords/", { ignored: /^\./, - persistent: true + persistent: true, + awaitWriteFinish: true }); watcher .on('add', function (path) { @@ -178,5 +180,4 @@ exports.getAppUid = () => { exports.executeProcess = (process) => { process.start(); -} - +}
\ No newline at end of file |