mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +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
15f378e72a
commit
8bd8328704
2 changed files with 16 additions and 1 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
* Source/NSAffineTransform.m:
|
* Source/NSAffineTransform.m:
|
||||||
Fix decoding of keyed archive containing identity transform.
|
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>
|
2013-03-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
|
|
@ -4209,10 +4209,21 @@ static NSFileManager *fm = nil;
|
||||||
{
|
{
|
||||||
NSString *homedir = NSHomeDirectory ();
|
NSString *homedir = NSHomeDirectory ();
|
||||||
|
|
||||||
if (![self hasPrefix: homedir])
|
if (YES == [self hasPrefix: @"~"])
|
||||||
{
|
{
|
||||||
return IMMUTABLE(self);
|
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])
|
if ([self length] == [homedir length])
|
||||||
{
|
{
|
||||||
return @"~";
|
return @"~";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue