From 20d117e1298cb5a7dfb366fbfc37e741fae1b8de Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Fri, 5 Mar 2010 22:56:15 -0800 Subject: [PATCH] Further movement to CFURL. Reviewed by me. --- Foundation/CPBundle.j | 2 +- Foundation/CPURLRequest.j | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Foundation/CPBundle.j b/Foundation/CPBundle.j index 2bcf5657a..bef8fdb69 100644 --- a/Foundation/CPBundle.j +++ b/Foundation/CPBundle.j @@ -159,7 +159,7 @@ var CPBundlesForURLStrings = { }; count = [staticResources count]; for (; index < count; ++index) - [staticResourceURLs addObject:[CPURL URLWithString:staticResources[index].path()]]; + [staticResourceURLs addObject:staticResources[index].URL()]; return staticResourceURLs; } diff --git a/Foundation/CPURLRequest.j b/Foundation/CPURLRequest.j index 44cffe50b..5d6b7fc9b 100644 --- a/Foundation/CPURLRequest.j +++ b/Foundation/CPURLRequest.j @@ -90,10 +90,8 @@ */ - (void)setURL:(CPURL)aURL { - if ([aURL isKindOfClass:[CPURL class]]) - _URL = aURL; - else - _URL = [CPURL URLWithString:String(aURL)]; + // Lenient and accept strings. + _URL = new CFURL(aURL); } /*!