win32: g_get_home_dir gives different directory in msys vs. non-msys

Derek Atkins warlord at MIT.EDU
Mon Feb 12 10:05:58 EST 2007


I think leaving it is fine.  Normal users wont notice it.
But I'd put it in the README.svn notes, I think.

-derek

Christian Stimming <stimming at tuhh.de> writes:

> FYI: The function of glib to get the user's home directory
> g_get_home_dir() gives sometimes unexpected results. As I've written in
> some header file:
>
> On Windows, g_get_home_dir() looks up the environment variable "HOME",
> then "USERPROFILE", then the Windows system directory. Watch out: In the
> normal non-mingw/msys environment, "HOME" is not set and instead only
> "USERPROFILE" is set, e.g. to "c:\Documents\Yourusername". But if this
> function is called from within msys, then msys itself has set "HOME" to
> a different value, e.g. to "c:\msys\1.0\home\yourusername". In effect,
> your program will see a different home directory when run from within
> the msys command prompt compared to without msys.
>
> Do we want to leave the behaviour this way in gnucash? Or do we want to
> change it when using the result of g_get_home_dir, ifdef'd on G_OS_WIN32?
>
> I'd say we just leave it this way, as only developers will use the msys
> shell anyway, but we as developers have to keep in mind this difference.
>
> Christian
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list