bugGNUstep - Bugs: bug #33453, stringByDeletingLastPathComponent...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33453: stringByDeletingLastPathComponent replaces consecutive slashes in GNUstep 1.22.0

Submitted by:  Andreas Voegele <avoegele>
Submitted on:  Wed 01 Jun 2011 10:28:09 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 01 Jun 2011 03:01:55 PM UTC, comment #1:

OSX replaces repeated slashes with single slashes, and current behavior fixes the earlier OSX incompatibility bug.

GNUstep policy is to generally consider deviations from OSX compatibility as bugs, and to fix bugs rather than preserving them. So while it's unfortunate that SOGo uses this method incorrectly, depending on an undocumented feature, we really can't re-instate the incorrect behavior.

However, I have modified the comments/documentation in svn trunk to make it clear that the path manipulation methods should not be used on non-path strings.

Richard Frith-Macdonald <CaS>
Project Member
Wed 01 Jun 2011 10:28:09 AM UTC, original submission:

According to Apple's documentation the stringByDeletingLastPathComponent method of the NSString class must only be used with file paths and not with URLs. But SOGo and possibly other software uses it with URLs. Somewhere between version 1.20.0 and 1.22.0 of GNUstep the stringByDeletingLastPathComponent method started to replace consecutive slashes by a single slash. For example, "mysql://user:secret@localhost/sogo/foo" becomes "mysql:/user:secret@localhost/sogo". I informed the SOGo project, but IMHO GNUstep shouldn't replace consecutive slashes for the sake of compatibility with earlier versions.

Andreas Voegele <avoegele>

 

Attached Files
file #23489:  GNUmakefile added by avoegele (221B - application/octet-stream - Example program)
file #23490:  TestStringByDeletingLastPathComponent.m added by avoegele (547B - application/octet-stream - Example program)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by avoegele (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 01 Jun 2011 03:01:55 PM UTCCaSStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Wed 01 Jun 2011 10:28:09 AM UTCavoegeleAttached File-=>Added GNUmakefile, #23489
      Attached File-=>Added TestStringByDeletingLastPathComponent.m, #23490

    Back to the top


    Powered by Savane 3.1-cleanup1