Fixed: File deletion broken
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user