[ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.35-0.1

Warren Young wyml@etr-usa.com
Fri Feb 13 23:35:00 GMT 2015


> On Feb 13, 2015, at 2:30 PM, Denis Excoffier <cygwin@Denis-Excoffier.org> wrote:
> 
> On 2015-02-13 22:04, Warren Young wrote:
>> 
>> I don’t think you should use %H when that directory might contain spaces.
> 
> You misunderstand. I don't need this stupid 'Document and Settings' thing. I need %H to represent my home dir, that means
> /cygdrive/d/Home/myuser1 on this XP P3 (a corporate one) and /cygdrive/c/Users/myuser2 on this W7 (another corporate).

In that case, I think you just want

	db_home: /%H

%H already expands to a directory that contains your Windows user name.  You don’t need to add %U to it.

> But currently, on XP SP3, the %H is replaced by '/cygdrive/d/Document and Settings/myuser1' which i'm pretty
> close to consider as a bug. Should be '/cygdrive/d/Home/myuser1' i suppose.

I’d be stunned if cygwin1.dll is hard-coding that string.  It must be getting it from somewhere.  I would do a registry scan to see if there is still some setting that still refers to c:\Documents and Settings.  I’m guessing you didn’t change everything needed when you moved your home directory.

Alternately, you can just force it:

    db_home: /cygdrive/d/Home/%U

This is a per-machine configuration file, after all, so there should be no shame in doing per-machine hacks when the “correct” solution is more difficult than it’s worth.

>>   C:/Documents\040and\040Settings /home ntfs binary 0 0
> 
> Good idea (a symlink would also do the job wouldn'it?)

Symlinks don’t have exactly the same semantics as mount points.  Mount points are absolutely transparent, whereas symlinks can do strange things:

    $ mkdir foo
    $ touch foo/bar
    $ ln -s foo foo2
    $ ls foo2
    foo2@
    $ ls foo2/
    bar

The requirement for a trailing slash to give directory-like behavior is annoying.  Mount points prevent that annoyance.
--
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