Skip to content

Archive Directory Flattening

Choose a tag to compare

@ALERTua ALERTua released this 21 Feb 16:29
· 83 commits to main since this release
b597cda

Some GitHub releases contain a redundant versioned folder inside the zip.
For example: D2RMM.1.8.1.zip contains a folder named D2RMM.1.8.1/
If you set flatten: true, files will be extracted directly to unzip_target,
skipping the redundant parent directory.

Example:

  d2rmm:
    url: "https://github.com/olegbl/d2rmm"
    git_asset: 'D2RMM.*\.zip'
    target: '{{games_dir}}\D2RMM.zip'
    unzip_target: '{{games_dir}}\D2RMM'
    flatten: true

NOTE: flatten only works when there's exactly ONE top-level directory in the zip.
If there are multiple directories or files at root level, it falls back
to normal extraction.