]> err.no Git - sope/commitdiff
fix in URL processing
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 3 Oct 2004 16:25:28 +0000 (16:25 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 3 Oct 2004 16:25:28 +0000 (16:25 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@219 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/FdExt.subproj/NSURL+misc.m
sope-core/NGExtensions/Version

index f799bb5c96fe1beebd707aecc0baf2aae352b7b0..47f5bd19fab5329ddf42292ddd57fcad94fee951 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * FdExt.subproj/NSURL+misc.m: fixed URL processing in some edge case
+         (v4.3.120)
+
 2004-10-02  Helge Hess  <helge.hess@opengroupware.org>
 
        * NGQuotedPrintableCoding.m: minor code cleanups (v4.3.119)
index 7870f2de19fad1f4e49ce5c73f3aaefbee176f3d..e7dad368f5085557e47f7e68ab9cf7b3304c5802 100644 (file)
@@ -94,7 +94,8 @@ static BOOL debugURLProcessing = NO;
   NSString *relPath;
   
   if (_base == self || _base == nil) {
-    relPath = [[self pathWithCorrectTrailingSlash] urlPathRelativeToSelf];
+    relPath = [self pathWithCorrectTrailingSlash];
+    relPath = [relPath urlPathRelativeToSelf];
     relPath = [self stringByAddingFragmentAndQueryToPath:relPath];
     if (debugURLProcessing) {
       NSLog(@"%s: no base or base is self => '%@'", 
@@ -192,14 +193,18 @@ static BOOL isEqual(id o1, id o2) {
   */
   NSString *p;
   NSString *lp;
+
+  /*
+    /SOGo/so/X/Mail/Y/INBOX/withsubdirs/
+    ..//SOGo/so/X/Mail/Y/INBOX/withsubdirs//
+  */
   
   p  = self;
   lp = [p lastPathComponent];
+  if (![p hasSuffix:@"/"])
+    return lp;
   
-  p = ([p hasSuffix:@"/"])
-    ? [NSString stringWithFormat:@"../%@/", p]
-    : lp;
-  return p;
+  return [[@"../" stringByAppendingString:lp] stringByAppendingString:@"/"];
 }
 
 - (NSString *)urlPathRelativeToRoot {
index 1dfd267e3fbdc37c27468cfac3ea79627af78832..bf24f267543e11c01b20cbe7e42433f19cefea8e 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=119
+SUBMINOR_VERSION:=120
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39