diff --git a/src/util.c b/src/util.c index 0e0633b4..49ef780d 100644 --- a/src/util.c +++ b/src/util.c @@ -1,5 +1,5 @@ /* - $Id: util.c,v 1.43 2005/02/22 02:02:46 rocky Exp $ + $Id: util.c,v 1.44 2005/02/26 15:41:20 rocky Exp $ Copyright (C) 2003, 2004, 2005 Rocky Bernstein @@ -500,23 +500,12 @@ print_fs_attrs(iso9660_stat_t *p_statbuf, bool b_rock, bool b_xa, strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &p_statbuf->tm); - /* Some RRIP writers incorrectly place ctime in the TF_CREATE field. - Try to handle this correctly for either case. */ - if (p_statbuf->rr.create.b_used) { - if (p_statbuf->rr.create.b_longdate) { - iso9660_get_ltime(&p_statbuf->rr.create.t.ltime, &tm); + /* Now try the proper field for mtime: attributes */ + if (p_statbuf->rr.modify.b_used) { + if (p_statbuf->rr.modify.b_longdate) { + iso9660_get_ltime(&p_statbuf->rr.modify.t.ltime, &tm); } else { - iso9660_get_dtime(&p_statbuf->rr.create.t.dtime, true, &tm); - } - strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &p_statbuf->tm); - } - - /* Now try the proper field for ctime: attributes */ - if (p_statbuf->rr.attributes.b_used) { - if (p_statbuf->rr.create.b_longdate) { - iso9660_get_ltime(&p_statbuf->rr.attributes.t.ltime, &tm); - } else { - iso9660_get_dtime(&p_statbuf->rr.attributes.t.dtime, true, &tm); + iso9660_get_dtime(&p_statbuf->rr.modify.t.dtime, true, &tm); } strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &tm); } diff --git a/test/isofs-m1.right b/test/isofs-m1.right index fda9c272..7028c837 100644 --- a/test/isofs-m1.right +++ b/test/isofs-m1.right @@ -22,7 +22,7 @@ ISO9660 filesystem /: drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26 . drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26 .. - -rw-r--r-- 1 715 715 [LSN 26] 17992 Apr 20 2003 11:26 COPYING + -rw-r--r-- 1 715 715 [LSN 26] 17992 Jul 29 2002 12:39 COPYING drwxrwxr-x 2 715 715 [LSN 24] 2048 Apr 20 2003 16:18 doc /doc/: diff --git a/test/joliet-nojoliet.right b/test/joliet-nojoliet.right index ac94e1db..6facdb43 100644 --- a/test/joliet-nojoliet.right +++ b/test/joliet-nojoliet.right @@ -4,20 +4,20 @@ PARTICULAR PURPOSE. __________________________________ ISO-9660 Information /: - d [LSN 28] 2048 Oct 22 2004 18:44 . - d [LSN 28] 2048 Oct 22 2004 18:44 .. - d [LSN 29] 2048 Oct 22 2004 18:44 libcdio + d [LSN 28] 2048 Oct 22 2004 22:44 . + d [LSN 28] 2048 Oct 22 2004 22:44 .. + d [LSN 29] 2048 Oct 22 2004 22:44 libcdio /libcdio/: - d [LSN 29] 2048 Oct 22 2004 18:44 . - d [LSN 28] 2048 Oct 22 2004 18:44 .. - - [LSN 34] 17992 Mar 12 2004 02:18 copying - - [LSN 43] 2156 Jun 26 2004 06:01 readme - - [LSN 45] 2849 Aug 12 2004 05:22 readme.libcdio - d [LSN 30] 2048 Oct 22 2004 18:44 test + d [LSN 29] 2048 Oct 22 2004 22:44 . + d [LSN 28] 2048 Oct 22 2004 22:44 .. + - [LSN 34] 17992 Mar 12 2004 07:18 copying + - [LSN 43] 2156 Jun 26 2004 10:01 readme + - [LSN 45] 2849 Aug 12 2004 09:22 readme.libcdio + d [LSN 30] 2048 Oct 22 2004 22:44 test /libcdio/test/: - d [LSN 30] 2048 Oct 22 2004 18:44 . - d [LSN 29] 2048 Oct 22 2004 18:44 .. - - [LSN 47] 74 Jul 25 2004 05:52 isofs_m1.cue + d [LSN 30] 2048 Oct 22 2004 22:44 . + d [LSN 29] 2048 Oct 22 2004 22:44 .. + - [LSN 47] 74 Jul 25 2004 09:52 isofs_m1.cue diff --git a/test/joliet.right b/test/joliet.right index 01544de1..a9ccb1c9 100644 --- a/test/joliet.right +++ b/test/joliet.right @@ -4,20 +4,20 @@ PARTICULAR PURPOSE. __________________________________ ISO-9660 Information /: - d [LSN 31] 2048 Oct 22 2004 18:44 . - d [LSN 31] 2048 Oct 22 2004 18:44 .. - d [LSN 32] 2048 Oct 22 2004 18:44 libcdio + d [LSN 31] 2048 Oct 22 2004 22:44 . + d [LSN 31] 2048 Oct 22 2004 22:44 .. + d [LSN 32] 2048 Oct 22 2004 22:44 libcdio /libcdio/: - d [LSN 32] 2048 Oct 22 2004 18:44 . - d [LSN 31] 2048 Oct 22 2004 18:44 .. - - [LSN 34] 17992 Mar 12 2004 02:18 COPYING - - [LSN 43] 2156 Jun 26 2004 06:01 README - - [LSN 45] 2849 Aug 12 2004 05:22 README.libcdio - d [LSN 33] 2048 Oct 22 2004 18:44 test + d [LSN 32] 2048 Oct 22 2004 22:44 . + d [LSN 31] 2048 Oct 22 2004 22:44 .. + - [LSN 34] 17992 Mar 12 2004 07:18 COPYING + - [LSN 43] 2156 Jun 26 2004 10:01 README + - [LSN 45] 2849 Aug 12 2004 09:22 README.libcdio + d [LSN 33] 2048 Oct 22 2004 22:44 test /libcdio/test/: - d [LSN 33] 2048 Oct 22 2004 18:44 . - d [LSN 32] 2048 Oct 22 2004 18:44 .. - - [LSN 47] 74 Jul 25 2004 05:52 isofs-m1.cue + d [LSN 33] 2048 Oct 22 2004 22:44 . + d [LSN 32] 2048 Oct 22 2004 22:44 .. + - [LSN 47] 74 Jul 25 2004 09:52 isofs-m1.cue