From: Greg Burri Date: Wed, 17 Mar 2021 21:11:30 +0000 (+0100) Subject: Use 'modified()' instead of 'created()' to get the file time. X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=e4843b60da657b286c9a6fe56a117fb7a1c58ef3;p=valheim_web.git Use 'modified()' instead of 'created()' to get the file time. --- 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::>();