r-lib / zip

Platform independent zip compression via miniz
https://r-lib.github.io/zip/
Other
83 stars 19 forks source link

Zip soft deprecation - zip docs need updating #30

Closed md0u80c9 closed 5 years ago

md0u80c9 commented 5 years ago

Hi,

openxlsx has not (yet) been updated to take account of the soft deprecation of zip. In the process I thought I'd look up the changes in zip 2.0.1.

However, the documentation for ?zip::zip currently neither mentions the deprecation - and indeed advises to use zip rather than zipr:

Assuming the current working directory is foo, the following zip entries are created by zip:

zip("x.zip", c("bar/file1", "bar2", "../foo2")) zip_list("x.zip")$filename

> bar/file1

> bar2

> bar2/file2

> ../foo2

> ../foo2/file3

For zipr (and zipr_append), each specified file or directory in files is created as a top-level entry in the zip archive. We suggest that you use zip and zip_append for new code, as they don't create non-portable archives. For the same directory structure, these zip entries are created:

zipr("x.zip", c("bar/file1", "bar2", "../foo2")) zip_list("x.zip")$filename

> file1

> bar2

> bar2/file2

> foo2

> foo2/file3

gaborcsardi commented 5 years ago

Fixed by eb99c1eb828bc394a90177aa527e3128b4d6a5b0

dracodoc commented 5 years ago

The current documentation still have a place that recommend zip, which should be a typo

We suggest that you use zip and zip_append for new code, as they don't create non-portable archives.