From c542f8a0dbf2200d8075340623e8f72be661dce5 Mon Sep 17 00:00:00 2001 From: Rudi Horn Date: Sun, 20 Nov 2022 21:08:44 +0100 Subject: [PATCH] Use modified time instead of created time (#32) Co-authored-by: Rudi Horn --- src/mailbox/maildir.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mailbox/maildir.rs b/src/mailbox/maildir.rs index 513a550..0d16a0d 100644 --- a/src/mailbox/maildir.rs +++ b/src/mailbox/maildir.rs @@ -197,7 +197,7 @@ impl Iterator for MessageIterator { if let Some(name) = path.file_name().and_then(|name| name.to_str()) { if !name.starts_with('.') { let internal_date = - match fs::metadata(&path).and_then(|m| m.created()).and_then(|d| { + match fs::metadata(&path).and_then(|m| m.modified()).and_then(|d| { d.duration_since(std::time::UNIX_EPOCH) .map(|d| d.as_secs()) .map_err(|e| {