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

Group
 
 

bug #33453: stringByDeletingLastPathComponent replaces consecutive slashes in GNUstep 1.22.0

Submitter:  Andreas Voegele <avoegele>
Submitted:  Wed 01 Jun 2011 10:28:09 AM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by avoegele (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-06-01 CaS StatusNone Invalid
        Open/ClosedOpen Closed
    2011-06-01 avoegele Attached File- Added GNUmakefile, #23489
        Attached File- Added TestStringByDeletingLastPathComponent.m, #23490

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code