Open jldupouey opened 6 months ago
Hi @jldupouey could you check if https://github.com/r-lib/archive/pull/80 (or #99) fixes the issue?
alternatively you can use non-Windows platforms including WSL
Hi @jldupouey and @cielavenir,
I can easily reproduce this with the reprex below. For me, it seems that both #80 and #99 fix this. If I understand well, it is "R-CMD-check / ubuntu-latest (release) (pull_request)" in GHA CI for #99 that is preventing this from being merged at the moment?
library(archive)
saveRDS(cars, "cars.rds")
archive_write_files("cars.7z", "cars.rds")
archive_extract("cars.7z")
readRDS("cars.rds") |> head()
#> Error in readRDS("cars.rds"): ReadItem: unknown type 0, perhaps written by later version of R
Created on 2024-07-03 with reprex v2.1.0
@rogiersbart sorry, i have not touched O_BINARY issue after I posted https://github.com/r-lib/archive/pull/73#issuecomment-1875688520 as they dont accept my attempt to unify coding styles spanning around multiple files.
Ok, I see, thanks for the feedback.
The following code shows that the
archive_write_files
function in thearchive
package incorrectly compressesgeopackage
files into7zip
.I've tried this with several different
geopackage
files, and the error is the same. The problem is with compression, not decompression.Is there an option to set in the
archive_write_files
function call for this type of file? Or is it a bug inarchive
?