This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: Spaces in paths (was RE: Newbie: W2K and Mounting problem.)
- To: cygwin at sources dot redhat dot com
- Subject: Re: Spaces in paths (was RE: Newbie: W2K and Mounting problem.)
- From: Benjamin Riefenstahl <Benjamin dot Riefenstahl at ision dot net>
- Date: Mon, 16 Oct 2000 16:34:38 +0200
- Organization: ISION Internet AG
- References: <003901c0352c$dee38620$0600000a@tired>
Hi Dan,
Dan Haynes wrote:
> [...] I accidentally discovered that cmd.exe
> treats the following identically:
>
> cd \usr \src
> cd \usr\src
>
> I knew that cmd.exe always tried to "imagine" quotes when paths with spaces
> were used, but I didn't realize is "patches up" misspelled names like this.
The reasons (pl) for this can be explained:
1) On Windows, programs get passed the whole command line as one
string. It's up to the program to interpret that string. By extension
the same goes for internal commands of COMMAND.COM and CMD.EXE. The
"cd" command has always treated the whole command line as the single
argument, even when called without quotes. So the call above is
equivalent to
cd "\usr \src"
2) Spaces at the end of file names are not significant, because on a
traditional 8.3 FAT file system, every name that was shorter than 8.3
was internally padded with spaces anyway. This seems to have been
carried over to file systems with long file names. So "\usr" is the
same as "\usr ", and "\usr\src" the same as "\usr \src".
so long, benny
--
ISION Internet AG
Benjamin Riefenstahl
mailto:benjamin.riefenstahl@ision.net
Ruhrstrasse 61
D-22761 Hamburg
http://www.ision.net
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com