Skip to content
  • Elvis Angelaccio's avatar
    libzip: fix extraction of folders without zip entry · 9a349f68
    Elvis Angelaccio authored
    Some zip archives may not have a zip entry for a folder, but only the
    entries for the files within that folder.
    
    The Part generates a fake `Archive::Entry` in such cases, which gets
    added the to list of entries passed to the `ExtractJob`.
    
    This is properly handled by unzip (which prints a "caution: filename not
    matched" warning for the virtual entry) and 7z. However, the libzip
    plugin would abort the whole extraction when it couldn't stat the
    missing entry.
    
    This patch just prints a warning when it detects a folder that cannot be
    stat'd (due to the NOENT error), but the extraction will continue as normal.
    
    BUG: 394542
    FIXED-IN: 18.04.3
    9a349f68