samoconnor / InfoZIP.jl

ZIP Archive Interface. Wrapper for Info-ZIP (and ZipFile.jl).
Other
10 stars 9 forks source link

Not working in Julia 1.8 and newer versions (particularly in Windows) #15

Open dpanigo opened 1 year ago

dpanigo commented 1 year ago

Dear developpers: As mentioned, InfoZIP fails to compile in Julia 1.8+ versions in Windows. Your package is very useful for us, thanks in advance for any fix or suggestion.

Nosferican commented 1 year ago

@samoconnor, have you been able to take a look into it?

dpanigo commented 1 year ago

Dear Jose.... We faced the same problem. So we use our own alternative in ModelSelection.jl but it is still under development. The package will be ready in a few weeks. Until Sam update his package, we will be (internally) using something like this (using ZipFile instead of InfoZIP):

function zip_folder(sourcefolder::AbstractString, destfolder::AbstractString ) path_separator = Sys.iswindows() ? "\" : "/" compress = true # or false, like you wish zdir = ZipFile.Writer(destfolder) for (root, dirs, files) in walkdir(sourcefolder) for file in files filepath = joinpath(root, file) f = open(filepath, "r") content = read(f, String) close(f) remdir = sourcefolder * path_separator zippath = replace(filepath, remdir => "") zf = ZipFile.addfile(zdir, zippath; method=(compress ? ZipFile.Deflate : ZipFile.Store)); write(zf, content) end end close(zdir) end

El mié, 22 mar 2023 a las 17:10, José Bayoán Santiago Calderón, PhD (< @.***>) escribió:

@samoconnor https://github.com/samoconnor, have you been able to take a look into it?

— Reply to this email directly, view it on GitHub https://github.com/samoconnor/InfoZIP.jl/issues/15#issuecomment-1480199366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI3QGRQTT2DIXTBV6DFDY3TW5NMEPANCNFSM6AAAAAAUANM7UM . You are receiving this because you authored the thread.Message ID: @.***>

-- Demian T. Panigo https://www.researchgate.net/profile/Demian_Panigo Lic. en Economía, UNLP, Master en Cs Sociales, UBA, Doctor en Economía, EHESS-ENS (Paris) Investigador Independiente del CONICET Docente investigador de la UNM, la UNQ, la UNDAV y la UNLP.