mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
OSX compatibility tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36430 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
22e037c478
commit
8ab462066b
2 changed files with 16 additions and 1 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
* Source/NSAffineTransform.m:
|
||||
Fix decoding of keyed archive containing identity transform.
|
||||
* Source/NSString.m:
|
||||
* Tests/base/NSString/tilde.m:
|
||||
Fix to standardize string if necessary to determine whether it has
|
||||
the home directory as a prefix.
|
||||
|
||||
2013-03-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
|
|
|
@ -4209,10 +4209,21 @@ static NSFileManager *fm = nil;
|
|||
{
|
||||
NSString *homedir = NSHomeDirectory ();
|
||||
|
||||
if (![self hasPrefix: homedir])
|
||||
if (YES == [self hasPrefix: @"~"])
|
||||
{
|
||||
return IMMUTABLE(self);
|
||||
}
|
||||
if (NO == [self hasPrefix: homedir])
|
||||
{
|
||||
/* OSX compatibility ... we clean up the path to try to get a
|
||||
* home directory we can abbreviate.
|
||||
*/
|
||||
self = [self stringByStandardizingPath];
|
||||
if (NO == [self hasPrefix: homedir])
|
||||
{
|
||||
return IMMUTABLE(self);
|
||||
}
|
||||
}
|
||||
if ([self length] == [homedir length])
|
||||
{
|
||||
return @"~";
|
||||
|
|
Loading…
Reference in a new issue