[gcab] file: fix saved file date



commit b0eb277ab3a1bab9f4408a3cdd0f48819f303968
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Thu Mar 12 22:38:50 2015 +0100

    file: fix saved file date

 libgcab/gcab-file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgcab/gcab-file.c b/libgcab/gcab-file.c
index b55fbb5..d97539d 100644
--- a/libgcab/gcab-file.c
+++ b/libgcab/gcab-file.c
@@ -142,7 +142,7 @@ gcab_file_update_info (GCabFile *self, GFileInfo *info)
     self->cfile.usize = g_file_info_get_size (info);
     self->cfile.fattr = GCAB_FILE_ATTRIBUTE_ARCH;
     self->cfile.date = ((m->tm_year + 1900 - 1980 ) << 9 ) +
-        ((m->tm_mon+1) << 5 ) + (m->tm_mday);
+        ((m->tm_mon+1) << 5 ) + (m->tm_mday+1);
     self->cfile.time = (m->tm_hour << 11) + (m->tm_min << 5) + (m->tm_sec / 2);
 
     return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]