[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File archivers and special DOS/Windows device names
From: |
Eli Zaretskii |
Subject: |
Re: File archivers and special DOS/Windows device names |
Date: |
Thu, 5 Jul 2001 13:14:38 +0300 (IDT) |
On Thu, 5 Jul 2001, 3APA3A wrote:
> If archive contains file with special name (such as prn, lpt1, com1,
> con, etc) it will be extracted to this device instead of file. Tested
> with pkzipc, WinRAR, rar, WinZip, tar (cygwin port under windows). In
> case of WinZip and tar file will be extracted silently, in other cases
> overwrite confirmation required.
I cannot speak for WinZip, pkzip, and other programs, but as for GNU Tar,
what you mention is a bug in the ported Cygwin executable. Try the DJGPP
port of Tar, and you will see that it handles such file names gracefully:
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/tar112ab.zip
Also, `prn' and `lpt1' are just a sample of the special names. Any
device driver which can be reached by opening a special file name will
cause such problems; thus the list of the offending names cannot be
known in advance, since additional device drivers can be installed on
the target system.
In addition, the file-name extension is ignored when the basename
matches. So `aux.lst', `prn.c', `con.foo', and an infinite number of
other similar names--all of them are prone to this problem. Some of the
devices will actually wedge the DOS box if you try to extract a file by
that name; kids, don't try that at home!