Skip to content

Conflict handling

Choose a tag to compare

@jszobody jszobody released this 04 Nov 17:46
· 6 commits to master since this release
82a5c81

Conflict handling

If two or more files are added to the zip with the same zip path, you can use ZIPSTREAM_CONFLICT_STRATEGY to configure how the conflict is handled:

  • ZIPSTREAM_CONFLICT_STRATEGY=skip: Keep the initial file, skip adding the conflicting file (default)
  • ZIPSTREAM_CONFLICT_STRATEGY=replace: Keep the latest file, overwrite previous files at the same path
  • ZIPSTREAM_CONFLICT_STRATEGY=rename: Append a number to the conflicting file name, e.g. file.txt becomes file_1.txt

Note: filenames are compared case-insensitive. FILE.txt and file.TXT are considered conflicting. If you are working only on a case-sensitive filesystem you can set ZIPSTREAM_CASE_INSENSITIVE_CONFLICTS=false. Don't do this if you have Windows users opening your zips!