[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] .gnubgautorc under windows

From: Holger
Subject: Re: [Bug-gnubg] .gnubgautorc under windows
Date: Mon, 13 Oct 2003 19:30:32 +0200

At 18:01 13.10.2003, Joern Thyssen wrote:
On Mon, Oct 13, 2003 at 04:49:20PM +0200, Holger wrote
> At 11:54 13.10.2003, Jon Kinsey wrote:
> >At 22:31 11/10/2003, Joern Thyssen wrote:
> >>
> >>A number of users have complained about gnubg for windows writing the
> >>settings file (and player statistics, boards, etc.) to the install
> >>directory.
> >>
> >>Any ideas on how to change this? Under unix the environment variable
> >>$HOME points to the user's home directory. Is there a similar
> >>environment variable under windows that point to C:\Document and
> >>Settings\username\?
> >
> >On windows 2000 and windows XP, USERPROFILE points to this directory, not
> >sure if it's the same on 95/98.
> No it doesn't exist at least on Win95. Imho it will certainly also depend
> on whether Windows is configured for multi-user access or just one standard
> user for everybody. The appropriate directories will not even exist.

Fair enough. On win95/98 there shouldn't be any problems with write
access to %USERPROFILE%.

If it exists, no. If the directory doesn't exist, you'll get an error on open().

I suggest the following:

gnubg read and writes .gnubgautorc, .gnubg/* to/from

(a) HOME on posix systems
(b) USERPROFILE on later windows versions
    (BTW, should it be %USERPROFILE%/gnubg instead?)

If you getenv() the variable then without the percent signs. If any command does env. variable expanding then it has to be used in the path with percent signs.

(c) current directory otherwise

What about the datadirectory?

The interesting part is "migration" of existing user's profiles. I
simply suggest that gnubg copies .gnubgautorc from the data directory to
%USERPROFILE% if non-existing in %USERPROFILE%.

But only if this directory already exists (except for the "\gnubg" part). I wouldn't like gnubg to create folders outside of its install directory on my system.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]