]> err.no Git - gant/commitdiff
Fix fr310xt case which has a working clock
authorTollef Fog Heen <tfheen@err.no>
Sun, 22 Apr 2012 13:15:17 +0000 (15:15 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sun, 22 Apr 2012 13:15:17 +0000 (15:15 +0200)
fr60.c

diff --git a/fr60.c b/fr60.c
index 8a18c4c3a77a3fc4a4e24a26ee965ba94f23f6e1..00ff9aa7086fdfd591142a1c492def73a7a2f24d 100644 (file)
--- a/fr60.c
+++ b/fr60.c
@@ -319,7 +319,8 @@ decode_antfs_dir(const uchar* blast, uint blsize)
                assert(sizeof(struct antfs_dir_header) == ANTFSHEADERSIZE);
 
                memcpy(&hdr, blast + 24, ANTFSHEADERSIZE);
-               if (hdr.modified_time < 0x0FFFFFFF)
+               printf("time format: %d\n", hdr.time_format);
+               if (hdr.modified_time < 0x0FFFFFFF && hdr.modified_time > 0)
                        clock_offset = time(NULL) - EPOCH_OFFSET - hdr.system_time;
                printf("system time: %d (offset: %d)\n", hdr.system_time, clock_offset);
                format_time(textual_time, "%c", 256, hdr.modified_time);