From e4843b60da657b286c9a6fe56a117fb7a1c58ef3 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Wed, 17 Mar 2021 22:11:30 +0100 Subject: [PATCH] Use 'modified()' instead of 'created()' to get the file time. --- backend/src/valheim_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/valheim_controller.rs b/backend/src/valheim_controller.rs index ea502b0..72eb60e 100644 --- a/backend/src/valheim_controller.rs +++ b/backend/src/valheim_controller.rs @@ -110,7 +110,7 @@ fn get_last_backup_datetime(backup_path: &str) -> Option { fs::read_dir(backup_path).ok()?.filter_map( |e| { let dir = e.ok()?; - if dir.path().is_file() { Some(dir.metadata().ok()?.created().ok()?) } else { None } + if dir.path().is_file() { Some(dir.metadata().ok()?.modified().ok()?) } else { None } } ) .collect::>(); -- 2.45.2