Bug 133267 - Use the right paths for website data
Summary: Use the right paths for website data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-25 15:23 PDT by Anders Carlsson
Modified: 2014-05-25 19:39 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.13 KB, patch)
2014-05-25 15:24 PDT, Anders Carlsson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-05-25 15:23:37 PDT
Use the right paths for website data
Comment 1 Anders Carlsson 2014-05-25 15:24:45 PDT
Created attachment 232044 [details]
Patch
Comment 2 Anders Carlsson 2014-05-25 15:30:51 PDT
Committed r169325: <http://trac.webkit.org/changeset/169325>
Comment 3 Darin Adler 2014-05-25 15:34:36 PDT
Comment on attachment 232044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232044&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm:156
> +    webContextConfiguration.localStorageDirectory = websiteDataDirectoryURL(@"LocalStorage").absoluteURL.path.fileSystemRepresentation;

Another possible fix would be:

    websiteDataDirectoryURL(@"LocalStorage").absoluteURL.fileSystemRepresentation

I don’t think there’s any need to call “path” explicitly. And unless it’s value to have these be relative URLs, I would expect that just:

    websiteDataDirectoryURL(@"LocalStorage").fileSystemRepresentation

would work too.
Comment 4 Darin Adler 2014-05-25 15:35:09 PDT
(In reply to comment #3)
> unless it’s value

I think I meant "valid", or "expected", here.
Comment 5 Anders Carlsson 2014-05-25 18:06:00 PDT
(In reply to comment #3)
> (From update of attachment 232044 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232044&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm:156
> > +    webContextConfiguration.localStorageDirectory = websiteDataDirectoryURL(@"LocalStorage").absoluteURL.path.fileSystemRepresentation;
> 
> Another possible fix would be:
> 
>     websiteDataDirectoryURL(@"LocalStorage").absoluteURL.fileSystemRepresentation
> 
> I don’t think there’s any need to call “path” explicitly. And unless it’s value to have these be relative URLs, I would expect that just:
> 
>     websiteDataDirectoryURL(@"LocalStorage").fileSystemRepresentation
> 
> would work too.

It would, except -[NSURL fileSystemRepresentation] isn't available on 10.8.
Comment 6 Darin Adler 2014-05-25 19:39:29 PDT
Comment on attachment 232044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232044&action=review

>>> Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm:156
>>> +    webContextConfiguration.localStorageDirectory = websiteDataDirectoryURL(@"LocalStorage").absoluteURL.path.fileSystemRepresentation;
>> 
>> Another possible fix would be:
>> 
>>     websiteDataDirectoryURL(@"LocalStorage").absoluteURL.fileSystemRepresentation
>> 
>> I don’t think there’s any need to call “path” explicitly. And unless it’s value to have these be relative URLs, I would expect that just:
>> 
>>     websiteDataDirectoryURL(@"LocalStorage").fileSystemRepresentation
>> 
>> would work too.
> 
> It would, except -[NSURL fileSystemRepresentation] isn't available on 10.8.

Oh, got it.