Desired Archive behavior w/r/t absolute paths?

Bernhard Pieber bernhard at pieber.com
Fri Sep 28 23:12:38 UTC 2001


Ned,

I also prefer the second strategy you proposed:
> /tmp/a/
> /tmp/a/b
> /tmp/c/d/
> /tmp/c/d/e
I normally do not want extracted items to go to different folders but to one
folder, which I want to specify during the extract operation. Otherwise it
is easy to loose track of the files.

Bernhard
----- Original Message -----
From: Ned Konz <ned at bike-nomad.com>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Friday, September 28, 2001 3:05 AM
Subject: Desired Archive behavior w/r/t absolute paths?


> The Zip archive format allows absolute pathnames (i.e. those starting with
> '/'). Most people don't use them, but it's generally possible to do so
> (possibly inadvertently).
>
> My ArchiveViewer allows extraction of all the files in an archive (which
may
> have a mixture of absolute and relative names) into a particular
directory.
> The obvious way to handle this is also a potentially dangerous one: use
the
> given directory as the root for the relative files, but extract the
absolute
> ones to their desired path. i.e., if you have an archive with the files
> (trailing / denotes a directory):
>
> /a/
> /a/b
> c/d/
> c/d/e
>
> and extracted to /tmp, you would get:
>
> /a/
> /a/b
> /tmp/c/d/
> /tmp/c/d/e
>
> Under Unix and some Windows NT systems, file permissions may protect files
> you don't own from being clobbered.
>
> The other obvious way to handle the problem is to make all files relative
> whether or not they started out that way in the archive, so we'd extract
the
> above as:
>
> /tmp/a/
> /tmp/a/b
> /tmp/c/d/
> /tmp/c/d/e
>
> If you wanted to extract to the root, of course, that's up to you and your
> filesystem security.
>
> I'm leaning toward the second strategy; does anyone have a preference on
this
> that they'd like to share?
>
> --
> Ned Konz
> currently: Stanwood, WA
> email:     ned at bike-nomad.com
> homepage:  http://bike-nomad.com
>
>
>





More information about the Squeak-dev mailing list