diff --git a/server/lib/rdio-scanner/dir-watch.js b/server/lib/rdio-scanner/dir-watch.js index d089ad4..791aceb 100644 --- a/server/lib/rdio-scanner/dir-watch.js +++ b/server/lib/rdio-scanner/dir-watch.js @@ -112,6 +112,7 @@ class DirWatch { } if (dirWatch.deleteAfter) { + this.unlink(filename); this.unlink(metaFile); } }); @@ -147,6 +148,7 @@ class DirWatch { } if (dirWatch.deleteAfter) { + this.unlink(filename); this.unlink(metaFile); } }); @@ -165,10 +167,10 @@ class DirWatch { talkgroup, }); } - } - if (dirWatch.deleteAfter) { - this.unlink(filename); + if (dirWatch.deleteAfter) { + this.unlink(filename); + } } } });