[OT] zip etiquette

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Fri Mar 12 00:20:35 PST 2010


Nick Sabalausky wrote:
> "Ellery Newcomer" <ellery-newcomer at utulsa.edu> wrote in message 
> news:hnc4o3$2lms$1 at digitalmars.com...
>> I suppose the name isn't so important, but I really hate zip files whose 
>> contents aren't contained inside a single directory.
> 
> This is a bit of a "vim vs emacs" or "static vs dynamic" sort of issue.
> 
> Most of the archive programs I've used, including the one I currently use, 
> put an "Extract to new directory" option into my file manager's right-click 
> menu. I *always* use that, and consider it downright silly not to. But every 
> once in a while I'll get an archive that follows the "nothing but one dir" 
> convention, so I get a useless extra subfolder that I have to either delete 
> or allow it to clutter up my filesystem, and that just irritates the hell 
> out of me.
> 
> Personally, I'm convinced that any archive program that doesn't allow you to 
> automatically create a subfolder by default is a bad archive program. And 
> I'm convinced that a convention that places restrictions on the top-level of 
> a zip is, well, rediculous. But obviously there are people that disagree 
> with me on that. So, I guess it's a "vim vs emacs" kind of thing.

I don't really disagree, but it's not always that simple.  Take tar, for 
instance, which has been around since forever, and which has a legacy 
you can't drop just like that.  (I wonder if it's even part of the POSIX 
standard?)  There are literally thousands of applications that depend on 
tar working in exactly the same way as it has always done, on all 
systems.  And that way is to automatically extract all files into the 
current directory unless otherwise specified.

As long as tar is the most common archive format on *NIX (and it is, by 
far), one must expect people to be true gentlemen and -women who put 
their files in a subdirectory inside the archive -- i.e. make tarballs 
and not tarbombs. :)


> What I really want is an archive program that automatically makes a 
> subfolder by default *but* detects if the top level inside the archive 
> contains nothing more than a single folder and intelligently *not* create a 
> new folder in that case. But I've yet to see one that does that, and I 
> haven't had time to make one. 

If you do, let me know.  I'd like that too. :)

-Lars



More information about the Digitalmars-d mailing list