Menu

#2552 ZHandler.cpp registration missing info

open
nobody
None
5
2025-02-24
2025-02-23
No

ZHandler.cpp's REGISTER_ARC_I macro is missing NArcInfoFlags::kKeepName

I've also noticed inconsistencies in this one and other similar formats with regards to flags like NArcInfoFlags::kMTime_Default -- there's no documentation for this flag, but I interpreted it to mean we should get the modified time from the parent container?

What's the general rule around these flags? If the filename is blank do we automatically fall back to the container's name minus the extension? If the datetimes are blank do we fallback to the container's props? I've been using these flags to determine whether or not to get the info from the parent container, but on some of these handlers, the flags are missing.

Discussion

  • Igor Pavlov

    Igor Pavlov - 2025-02-24

    7-Zip uses these flags for archive creation.
    But 7-Zip doesn't support Z archive creation.
    So 7-Zip doesn't need these flags for Z archive handler.

     
  • Robert Simpson

    Robert Simpson - 2025-02-24

    Is there some logic in the code somewhere else I should look for that tells me when to pull the datetime's from the parent container and when to use the parent's filename when decompressing?

     
    • Robert Simpson

      Robert Simpson - 2025-02-24

      Nevermind, I figured it out after debugging 7zFM. MTime inherits from the parent if it doesn't exist in the child, and if kpidPath doesn't exist, you go get the parent's name, grab the parent's extension, match it to the archiver's known extension(s), strip it, and if necessary add an "addext" extension to the name if it lines up with an extension that requires one.

       
  • Igor Pavlov

    Igor Pavlov - 2025-02-24

    7-Zip use parent name if reported name from archive is empty.
    7-Zip uses parent timestamp if there is no timestamp in archive.

     

Log in to post a comment.

Monday.com Logo