Don't trigger an int overflow on files' age computation

https://bugzilla.gnome.org/show_bug.cgi?id=758898
This commit is contained in:
Sebastien Bacher 2015-12-01 13:41:27 +01:00 committed by Carlos Soriano
parent 450bf6bc93
commit e6587b86b4

View file

@ -4712,8 +4712,7 @@ nautilus_file_get_date_as_string (NautilusFile *file,
g_date_time_get_day_of_month (now),
0, 1, 0);
days_ago = g_date_time_difference (today_midnight, file_date) /
(24 * 60 * 60 * 1000 * 1000L);
days_ago = g_date_time_difference (now, file_date) / G_TIME_SPAN_DAY;
use_24 = g_settings_get_enum (gnome_interface_preferences, "clock-format") ==
G_DESKTOP_CLOCK_FORMAT_24H;