bug-gnustep
[Top][All Lists]
Advanced

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

NSString.m: 2 Bugs


From: Roland Schwingel
Subject: NSString.m: 2 Bugs
Date: Mon, 02 Feb 2004 14:27:03 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

Hi...

It is again me... Spotted 2 bugs in NSString.m:

1. Method - stringByAbbreviatingWithTildeInPath:
  Here is currently a wrong +1 in the final
  stringByAppendingPathComponent: call. This was
  introduced by merging one of the patches I supplied
  a while ago. Unfortunately I did not spot it in the
  immediate reviewing after the merge.

2. + (NSString*) localizedNameOfStringEncoding: (NSStringEncoding)encoding
  Here is a problem with getting the encoding names localized. Obviously
  the detection of the bundle to ask was not adapted to the new scheme a
while ago. When doing it like it is done in the rest of the code it works.

Attached you find a patch for both issues...
Hope you can apply it.

Thanks...

Roland


--- NSString.m.orig     2004-02-02 14:18:53.000000000 +0100
+++ NSString.m  2004-02-02 14:20:20.000000000 +0100
@@ -2856,7 +2856,7 @@
       Until we have it, just make sure that bundle
       is initialized.
 */
-  ourbundle = [NSBundle gnustepBundle];
+  ourbundle = ourbundle = [NSBundle bundleForLibrary: @"gnustep-base"];
 
   ourname = GetEncodingName(encoding);
   return [ourbundle localizedStringForKey: ourname
@@ -3517,7 +3517,7 @@
       return @"~";
     }
   return [@"~" stringByAppendingPathComponent:
-    [self substringFromIndex: [homedir length] + 1]];
+    [self substringFromIndex: [homedir length]]];
 }
 
 /**

reply via email to

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