[nautilus] Don't trigger an int overflow on files' age computation
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't trigger an int overflow on files' age computation
- Date: Wed, 2 Dec 2015 10:56:26 +0000 (UTC)
commit e6587b86b4c7543a3b0fd20da88d964865106d86
Author: Sebastien Bacher <seb128 ubuntu com>
Date: Tue Dec 1 13:41:27 2015 +0100
Don't trigger an int overflow on files' age computation
https://bugzilla.gnome.org/show_bug.cgi?id=758898
libnautilus-private/nautilus-file.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 8fde7c5..811251d 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]