Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rar2fs returns wrong timestamp with legacy format. #36

Closed
hasse69 opened this issue Mar 13, 2015 · 5 comments
Closed

rar2fs returns wrong timestamp with legacy format. #36

hasse69 opened this issue Mar 13, 2015 · 5 comments

Comments

@hasse69
Copy link
Owner

hasse69 commented Mar 13, 2015

Original issue 36 created by hasse69 on 2014-07-01T12:11:27.000Z:

What steps will reproduce the problem?

  • Prepare file.
    • NOTE : "l" is aslias for "ls -lAF --full-time".
    # l
    total 1932
    -rw-r--r-- 1 root root 1977432 2014-07-01 21:00:52.207498641 +0900 winrar-x64-501.exe
  • Create RAR legacy format file contains that file.
    • NOTE : WinRAR creates legacy format of archive file by default unless user specifies -ma5 option.
    # WINEPREFIX=/mnt/WINRAR_ROOT wine 'C:\Program Files\WinRAR\Rar.exe' a -m0 RAR.rar winrar-x64-501.exe
  • Mount archive.
    # mkdir TEST
    # rar2fs -o ro,allow_other RAR.rar TEST

    4. Listing file.

    # l TEST/
    total 1932
    -rw-r--r-- 1 root root 1977432 2014-07-01 21:01:17.207498600 +0900 winrar-x64-501.exe

What is the expected output? What do you see instead?

  • It must be '2014-07-01 21:00:52.207498641 +0900', but it returns '2014-07-01 21:01:17.207498600 +0900' as +25 seconds after than original.

What version of the product are you using? On what operating system?

  • OS : Gentoo x86_64
    # rar2fs -V
    rar2fs v1.20.0 (DLL version 6)    Copyright (C) 2009-2014 Hans Beckerus
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under
    certain conditions; see <http://www.gnu.org/licenses/> for details.
    FUSE library version: 2.9.3
    fusermount version: 2.9.3
    using FUSE kernel interface version 7.19

    # emerge --search unrar
    Searching...    
    [ Results for search key : unrar ]
    [ Applications found : 3 ]

    *  app-arch/unrar
          Latest version available: 5.1.5
          Latest version installed: 5.1.5
          Size of files: 210 kB
          Homepage:      http://www.rarlab.com/rar_add.htm
          Description:   Uncompress rar files
          License:       unRAR

Please provide any additional information below.

  • I'll attach sample file to reproduce this issue.

Original issue reported on code.google.com by jyhpsycho on 2014-07-01 21:00:52

@hasse69
Copy link
Owner Author

hasse69 commented May 24, 2015

It may be not a bug of rar2fs or unrar, but wine... I'll check it some more.

Original issue reported on code.google.com by jyhpsycho on 2014-07-12 23:35:14

@hasse69
Copy link
Owner Author

hasse69 commented May 24, 2015

From what I can tell WinRAR also reports the time as '2014-07-01 21:01:17' so I would
say this is not a problem in rar2fs.

Original issue reported on code.google.com by hans.beckerus on 2014-07-16 16:18:45

@hasse69
Copy link
Owner Author

hasse69 commented May 24, 2015

This issue will be tagged as 'invalid' until some more information can be presented
that would indicate this being a bug in rar2fs.

Original issue reported on code.google.com by hans.beckerus on 2014-07-17 19:43:59

@hasse69
Copy link
Owner Author

hasse69 commented May 24, 2015

OK, I can reproduced why it occurs.

I used 'right_timezone' USE flag when compiling gentoo system. This flag is applied
to sys-libs/timezone-data package. According to http://gport.net/use/right_timezone/,
when using this USE flag and set timezone data to right/*/*, it applies 'leap seconds'
when treating timestamp, thus it causes returning different timestamp by several seconds
compared with legacy POSIX timestamp.

I don't know why that behavior only occurs with legacy format, but I guess it is WINE's
bug on timestamp-related API functions. It's NOT rar2fs' bug - it always returns correct
timestamp.

Original issue reported on code.google.com by jyhpsycho on 2014-09-03 11:18:20

@hasse69
Copy link
Owner Author

hasse69 commented May 24, 2015

Thanks for taking your time to verify the root cause and confirming that this is not
a bug in rar2fs.

Original issue reported on code.google.com by hans.beckerus on 2014-09-03 12:27:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant