Bug 274695
| Summary: | [Cococa] Ensure temporary PDF file paths are written matching the meaning of their relevant file URLs | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> |
| Component: | WebKit2 | Assignee: | Brent Fulgham <bfulgham> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bfulgham, kkinnunen, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brent Fulgham
NSFileManager creates file using the exact strings provided as paths. If a file URL with percent-encoded values is passed to it, the file paths are created without decoding the paths.
For example, a file URL like "file:///tmp/some%20temp%20file.txt" will be created as the path "/tmp/some%20%temp%20file.txt", rather than "/tmp/some\ temp\ file.txt".
When a file URL is passed to NSWorkspace to open a path, the path is decoded.
This creates a mismatch, such that a request to create and then open a temporary file of "/tmp/some%20%temp%20file.txt" causes NSWorkspace to attempt to open the file "/tmp/some\ temp\ file.txt", which fails.
This patch corrects this mis-match so that temporary PDF files can open properly.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Brent Fulgham
<rdar://127379128>
Brent Fulgham
Pull request: https://github.com/WebKit/WebKit/pull/29099
EWS
Committed 279359@main (ae3780f0dcc3): <https://commits.webkit.org/279359@main>
Reviewed commits have been landed. Closing PR #29099 and removing active labels.