gesistsa / rio

🐟 A Swiss-Army Knife for Data I/O
http://gesistsa.github.io/rio/
594 stars 77 forks source link

rio::import not working for zip files #425

Closed alexmunday17 closed 1 month ago

alexmunday17 commented 1 month ago
filename <- "tmp.csv"
zip_file <- "test.zip"
write.csv(1, filename)
zip(zip_file, filename)
x <- rio::import(zip_file)
file.remove(filename)
file.remove(zip_file)

This works on rio 1.0.1 but not rio 1.1.0. It looks to be something to do with this commit

chainsawriot commented 1 month ago

@alexmunday17 Thanks for the report. I can confirm this.

https://github.com/gesistsa/rio/blob/c6c626d438b08e3ebfafbbc98c334c85e5cb847b/R/import.R#L138-L139

I will explore reversing these two lines.

chainsawriot commented 1 month ago

@alexmunday17 It is now fixed. Please use the Github version for now. I will upload a version to CRAN soon.