Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/PhieF/CarnetElectron.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhoenamandre <phoenamandre@gmail.com>2018-02-02 00:38:05 +0300
committerPhoenamandre <phoenamandre@gmail.com>2018-02-02 00:38:05 +0300
commit6fc3c5e1102ddc75aea59c89abbe8c4bc80a8dd7 (patch)
tree2df9cf664786dc8e85b2e47d4edf1b7cf5311eec /main.js
parent3da360154a8df8360651758c6c8f33c5b19a1eb0 (diff)
waiting for file to be entirely writen
Diffstat (limited to 'main.js')
-rw-r--r--main.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.js b/main.js
index befc99e..2062371 100644
--- a/main.js
+++ b/main.js
@@ -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