Cygwin Setup Command-line Arguments - Paths with a Space Incorrectly Parsed

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Tue Nov 15 07:33:00 GMT 2016


On 2016-11-14 07:43, Gerrit Haase wrote:
> 2016-11-13 23:19 GMT+01:00 OwN-3m-All wrote:
>> I'd like to automate Cygwin installation, but I don't want to rule
>> out the possibility that a path with a space will not be used.
>
> You'll get a warning from Setup: it is strongly recommended, to use a
> root path without spaces.

I'd go further - it is strongly recommended that you use only a subset
of printable ASCII characters to avoid problems with Windows OEM and
NLS code pages, and Cygwin mapping of some characters to UTF-16 user
defined supplementary characters, understood only by Cygwin internals,
for POSIX compatibility.
So disallow names with anything disallowed by Windows:
	"*/:<>?\|
or outside the [!-~] range leaving [!#-)+-.0-9;=@-[\]-{}~]
It would also be sensible to disallow anything interpreted by shells,
including cmd, or programs, to avoid issues:
	!#$%&'();[]`{}
reducing the set to [+-.0-9=@-Z^_a-z~] i.e.
	+,-.=@^_~
plus digits and letters, to maintain interoperability without issues.
Leading -.@~ should be disallowed as they have special meaning, and
trailing ~ is questionable as it is often used for backup files,
removed by cleanup scripts, so you might also want to disallow these.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list