diff --git a/rslib/src/collection/backup.rs b/rslib/src/collection/backup.rs index 5244d1b9356..1f58065584d 100644 --- a/rslib/src/collection/backup.rs +++ b/rslib/src/collection/backup.rs @@ -65,7 +65,17 @@ fn has_recent_backup(backup_folder: &Path, recent_mins: u32) -> Result { Ok(read_dir(backup_folder)? .filter_map(|res| res.ok()) .filter_map(|entry| entry.metadata().ok()) - .filter_map(|meta| meta.created().ok()) + .filter_map(|meta| { + // created time unsupported on Android + #[cfg(target_os = "android")] + { + meta.modified().ok() + } + #[cfg(not(target_os = "android"))] + { + meta.created().ok() + } + }) .filter_map(|time| now.duration_since(time).ok()) .any(|duration| duration.as_secs() < recent_secs)) }