gnustep-dev
[Top][All Lists]
Advanced

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

NSHomeDirectory() problems on windows


From: Roland Schwingel
Subject: NSHomeDirectory() problems on windows
Date: Mon, 21 Jul 2003 15:20:07 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

Hi...

A while ago in NSUser.m the way changed how the users homedirectory is depicted. Before this change the implementation was much like the Openstep for Windows one. Constructing it out of $HOMEPATH and $HOMEDRIVE. Now it is changed to first query $USERPROFILE (which so violates the OpenStep specification). And if not found fall back to old (in my eyes correct implementation).

By the way there is maybe a bug in the current implementation for asking $USERPROFILE. After retrieving the environmentvariable it is checked to not contain spaces. Well at least in german versions of Windows 2000 and Windows XP there are spaces by default. $USERPROFILE in german versions of windows always contains "Dokumente und Einstellungen". So it would be never used here, but elsewehere....

I personally hate the way windows userprofiles work. We use NSHomeDirectory() here as basepath for our resources, which should never ever reside in the userprofile at least because of their size. So we really rely on this to not point to $USERPROFILE.

So what to do? I think this wasn't changed out of pure fun... Even I would like to have it back again to be compliant to the openstep for windows version, I suggest to make it eventually switchable. For example using a new environment variable (eg. GNUSTEP_WIN32_HOMEDIRSTYLE). If it is missing (or set to "profile") the current behaviour is used. If set to eg. "openstep" it is no longer queried for $USERPROFILE instead the HOMEPATH/HOMEDRIVE variant will be used directly...

It you like I can supply a patch doing this...

Roland






reply via email to

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