Menu

#222 Wrong total size when extracting ISO

open-fixed
nobody
None
5
2014-07-31
2012-01-01
Nathan
No

The total size that is passed to setTotal is off. When it calls setTotal during extraction it includes the size of directory entries. This would not be a problem, but directories don't return a size property as indicated by IsoHandler.cpp @ 186. So when it goes to report the progress for each item it never includes the size of the directories, however the size of the directories are included in the total. Therefore the completed size would never be 100% for ISOs that have a size entry for the directories.

I recommend doing IsoHandler.cpp @ line 221:

const CDir &item = ref.Dir->_subItems[ref.Index];
if (item.IsDir())
continue;
totalSize += item.DataLength;

I came across this issue while extracting an ISO named en_office_2007_home_student_x86_dvd.iso, probably from MSDN. Created using CDIMAGE 2.47 (10/12/2000 TM).

Discussion

  • Igor Pavlov

    Igor Pavlov - 2012-01-01

    What version of 7-Zip do use?
    What exact lines do you change in source code?

     
  • Nathan

    Nathan - 2012-01-01

    I use version 9.20. I couldn't get 9.22 beta to compile because VS2008 kept complaining about Prop.. definition missing or something.

    Below line 221 of IsoHandler.cpp, which is:
    const CDir &item = ref.Dir->_subItems[ref.Index];

    I added:

    if (item.IsDir())
    continue;

    So that goes above line that says
    totalSize += item.DataLength.

    These changes are to CHandler::Extract of IsoHandler and in the first for loop.

     
  • Igor Pavlov

    Igor Pavlov - 2012-01-01

    It was fixed in 9.22.
    So you can get that file from 9.22 source code.

     
  • Igor Pavlov

    Igor Pavlov - 2012-01-01
    • status: open --> open-fixed
     
  • Nathan

    Nathan - 2012-01-01

    Great! I'll just grab that file only from the lzma922.tar.bz2 package since the project itself is missing definitions.

    Thanks and Happy new year!

     
  • Nathan

    Nathan - 2012-01-01

    Looks like I was using the wrong zip file. I don't have the problems with the missing definitions anymore. :p

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.