diff --git a/src/info_zip.jl b/src/info_zip.jl index 72c7bfb..7dc8d1f 100644 --- a/src/info_zip.jl +++ b/src/info_zip.jl @@ -80,6 +80,8 @@ end function Base.get(z::Archive, filename::AbstractString, default=nothing) + @assert !ismatch(r"^/", filename) + if !haskey(z, filename) return default end @@ -99,6 +101,8 @@ end function Base.setindex!(z::Archive, data, filename::AbstractString) + @assert !ismatch(r"^/", filename) + # Write file to tempdir... mkpath(joinpath(z.tempdir, dirname(filename))) write(joinpath(z.tempdir, filename), data)