List Archive

Thread

Thread Index

Message

From: Thomas Klausner <tk%giga.or.at@localhost>
To: Andreas Falkenhahn <andreas%falkenhahn.com@localhost>
Subject: Re: Shouldn't zip_file_set_encryption() fail on directories?
Date: Mon, 6 Nov 2017 17:53:45 +0100

On Mon, Nov 06, 2017 at 05:29:10PM +0100, Andreas Falkenhahn wrote:
> On 06.11.2017 at 17:20 Thomas Klausner wrote:
> 
> > On Mon, Nov 06, 2017 at 05:16:10PM +0100, Andreas Falkenhahn wrote:
> >> When I use zip_file_set_encryption() on an index that specifies a directory
> >> instead of a file, it doesn't fail but returns 0. Is it supposed to behave
> >> like that? Isn't it that only files can be encrypted?
> 
> > There is no separate type "directory" in zip archives. The difference
> > is only that the name ends with a slash.
> 
> Ok, so what happens when trying to zip_fopen() something like "foo/"?

Usually it's a zero-byte file.

But you could just try it out :)
 Thomas

Made by MHonArc.