dirWatch: purge audio and meta files at the same time

This commit is contained in:
Chrystian Huot 2020-05-21 09:01:41 -04:00
parent dce2cd2439
commit aecee503b5

View file

@ -112,6 +112,7 @@ class DirWatch {
} }
if (dirWatch.deleteAfter) { if (dirWatch.deleteAfter) {
this.unlink(filename);
this.unlink(metaFile); this.unlink(metaFile);
} }
}); });
@ -147,6 +148,7 @@ class DirWatch {
} }
if (dirWatch.deleteAfter) { if (dirWatch.deleteAfter) {
this.unlink(filename);
this.unlink(metaFile); this.unlink(metaFile);
} }
}); });
@ -165,12 +167,12 @@ class DirWatch {
talkgroup, talkgroup,
}); });
} }
}
if (dirWatch.deleteAfter) { if (dirWatch.deleteAfter) {
this.unlink(filename); this.unlink(filename);
} }
} }
}
}); });
this.watchers.push(watcher); this.watchers.push(watcher);