mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
MINGW fixes to home directory stuff.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9276 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
70494ca890
commit
2682b811c9
2 changed files with 16 additions and 4 deletions
|
@ -1245,12 +1245,15 @@ static NSFileManager* defaultManager = nil;
|
|||
}
|
||||
else if (c_path[0] == '/')
|
||||
{
|
||||
NSDictionary *env;
|
||||
NSDictionary *env;
|
||||
NSString *cyghome;
|
||||
|
||||
env = [[NSProcessInfo processInfo] environment];
|
||||
if ([env objectForKey: @"CYGWIN"])
|
||||
cyghome = [env objectForKey: @"CYGWIN_HOME"];
|
||||
if (cyghome != nil)
|
||||
{
|
||||
/* FIXME: Find cygwin drive? */
|
||||
newpath = @"c:/cygwin";
|
||||
newpath = cyghome;
|
||||
newpath = [newpath stringByAppendingPathComponent: path];
|
||||
newpath = [newpath stringByReplacingString: @"/" withString: @"\\"];
|
||||
}
|
||||
|
|
|
@ -147,7 +147,16 @@ NSHomeDirectoryForUser(NSString *login_name)
|
|||
s = [NSString stringWithCString: buf];
|
||||
}
|
||||
else
|
||||
s = nil;
|
||||
{
|
||||
s = nil;
|
||||
}
|
||||
|
||||
if (s != nil)
|
||||
{
|
||||
n = GetEnvironmentVariable("HOMEDRIVE", buf, 1024);
|
||||
buf[n] = '\0';
|
||||
s = [[NSString stringWithCString: buf] stringByAppendingString: s];
|
||||
}
|
||||
[gnustep_global_lock unlock];
|
||||
return s;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue