Permit ~/Library to be a symlink
Created attachment 199570 [details]
Comment on attachment 199570 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=199570&action=review
Looks good to me, with a question about pwd.pw_dir encoding below.
Note however that this behavior doesn't quite match AppSandbox, which also allows ~/Library/Preferences to be a symlink.
> +(define (home-library-regex home-library-relative-regex)
> + (regex (string-append "^" (regex-quote (param "HOME_LIBRARY_DIR")) home-library-relative-regex)))
Indentation should be 4 characters here, too.
> + String libraryPath = String(pwd.pw_dir);
This constructor treats the input as Latin-1. Is this correct, or should it be UTF-8? In the latter case, String::fromUTF8() is the right way to create the String object.
Created attachment 199861 [details]
Updated the patch to support both ~/Library and ~/Library/Preferences.
Made sure that a home directory containing unicode makes it to the Sandboxing without being mangled.
Comment on attachment 199861 [details]
Commit queue won't land this patch because of spaces. I'll land manually.