From a075e3bec9a875f0cf34e9460c5a2cca6c332fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Szczygie=C5=82?= Date: Tue, 16 Jul 2024 09:38:56 +0300 Subject: [PATCH] Fix incorrect timestamp conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mateusz Szczygieł --- changelog.md | 1 + norddrop/src/uni.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 4e0a120c..ba02f96a 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ * Remove support for deprecated, unsecure protocols V1, V2, V4 and V5 * Sanitize file ID before downloading a file, to prevent the temporary file from being allowed to traverse parent dirs * Implement automatic transfer cancellation when all files reach the terminal state +* Fix incorrect timestamp conversions in `purge_transfers_until()` and `transfers_since()` ---
diff --git a/norddrop/src/uni.rs b/norddrop/src/uni.rs index 0b6e75be..a7191bc3 100644 --- a/norddrop/src/uni.rs +++ b/norddrop/src/uni.rs @@ -97,7 +97,7 @@ impl NordDrop { self.dev .lock() .expect("Poisoned lock") - .purge_transfers_until(until / 100) + .purge_transfers_until(until / 1000) } pub fn transfers_since(&self, since: i64) -> Result> { @@ -107,7 +107,7 @@ impl NordDrop { .dev .lock() .expect("Poisoned lock") - .transfers_since(since / 100)?; + .transfers_since(since / 1000)?; let xfers = infos.into_iter().map(TransferInfo::from).collect(); Ok(xfers)