Fixed: File deletion broken

This commit is contained in:
Christoph Wiechert
2017-05-07 21:24:43 +02:00
parent a8fc0d4c3c
commit 703c733e9d

View File

@@ -19,7 +19,7 @@ module.exports = class DB {
for (sid of Object.keys(this.db)) { for (sid of Object.keys(this.db)) {
for (f of this.db[sid]) { for (f of this.db[sid]) {
// no removal of one-time downloads // no removal of one-time downloads
if(!Number.isInteger(f.metadata.retention)) return; if(!Number.isInteger(+f.metadata.retention)) return;
expires = (+f.metadata.createdAt) + (+f.metadata.retention * 1000) - Date.now(); expires = (+f.metadata.createdAt) + (+f.metadata.retention * 1000) - Date.now();
if(expires <= 0) { if(expires <= 0) {