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.
<rdar://127379128>
Pull request: https://github.com/WebKit/WebKit/pull/29099
Committed 279359@main (ae3780f0dcc3): <https://commits.webkit.org/279359@main> Reviewed commits have been landed. Closing PR #29099 and removing active labels.