Wait for .torrent files to finish downloading.

This commit is contained in:
Alberto Miranda
2017-03-26 11:04:05 -03:00
parent 23eef1a058
commit 6e67cae494

View File

@@ -25,7 +25,10 @@ class FolderWatcher {
const glob = `${torrentsFolderPath}/**/*.torrent`
log('Folder Watcher: watching: ', glob)
const options = {ignoreInitial: true}
const options = {
ignoreInitial: true,
awaitWriteFinish: true
}
this.watcher = chokidar.watch(glob, options)
this.watcher
.on('add', (path) => {