mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Improve robustness of finding devroot on Windows
Fixes possible infinite loop if developer root is not found. Also disable devroot() code under MSVC, as there will be no MSYS environment.
This commit is contained in:
parent
b41953d274
commit
3b8009654c
1 changed files with 5 additions and 5 deletions
|
@ -2134,9 +2134,9 @@ NSOpenStepRootDirectory(void)
|
|||
return root;
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* The developer root on a windows system (where we have an msys environment
|
||||
* set up) is the point in the filesystem where we can reference make.exe via
|
||||
#if defined(__MINGW__)
|
||||
/* The developer root under MinGW (where we have an MSYS environment set up)
|
||||
* is the point in the filesystem where we can reference make.exe via
|
||||
* msys/.../bin/. That is, it's the windows path at which msys is installed.
|
||||
*/
|
||||
static NSString*
|
||||
|
@ -2144,7 +2144,7 @@ devroot(NSFileManager *manager, NSString *path)
|
|||
{
|
||||
NSString *tmp = @"";
|
||||
|
||||
while (NO == [tmp isEqual: path])
|
||||
while (path && NO == [tmp isEqual: path])
|
||||
{
|
||||
NSString *pb;
|
||||
NSString *msys;
|
||||
|
@ -2323,7 +2323,7 @@ if (domainMask & mask) \
|
|||
|
||||
case NSDeveloperDirectory:
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
#if defined(__MINGW__)
|
||||
if (nil == gnustepDeveloperDir)
|
||||
{
|
||||
NSString *path = nil;
|
||||
|
|
Loading…
Reference in a new issue