bugGNUstep - Bugs: bug #31153, [Foundation] NSURL problem with...

Group
 
 

bug #31153: [Foundation] NSURL problem with URLWithString relativeToURL

Submitter:  Riccardo Mottola <rmottola>
Submitted:  Tue 28 Sep 2010 02:27:22 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 01 Oct 2010 08:16:19 AM UTC, comment #1: 

Thanks ... should be fixed in svn now ... please give it a try.

Richard Frith-Macdonald <CaS>
Group Member
Tue 28 Sep 2010 02:27:22 PM UTC, original submission:  

given the following code snippet:

  sourceURL = [NSURL URLWithString:@"file://localhost/System/Library/Documentation/Developer/Gui/Reference/index.html"];
  NSLog(@"source url: %@", sourceURL);

  link = @"NSApplication.html";
  myURL = [NSURL URLWithString:link relativeToURL:sourceURL];
  NSLog(@"with link %@, obtained URL: %@", link, myURL);

  link = @"NSApplication.html#class$NSApplication";
  myURL = [NSURL URLWithString:link relativeToURL:sourceURL];
  NSLog(@"with link %@, obtained URL: %@", link, myURL);


with the simple link, the URL created will contain:
NSApplication.html -- file://localhost/System/Library/Documentation/Developer/Gui/Reference/index.html


with the link containing the anchor (# character) the created URL is nil. The created URL is still nil even if the $ part is moitted, so it is not part of the problem.

Riccardo Mottola <rmottola>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 rmottola (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-06 rmottola Open/ClosedIn Test Closed
    2010-10-01 CaS StatusNone Fixed
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code