WriteUTF8FileAtomic overrides the content of the file "atomically" by creating a temp file and then renaming it to the original path. The problem arises when the original path is symbolic link, as the link itself gets overridden by a file (rather than the link target). This PR introduces a special handling of the symlinks: if the path as a symlink we resolve the path and use: 1. target's directory to create a temp-file in 2. target itself to be replaced with the tempfile. Symlink resolution is problematic when the target path does not exist, as there is no good utility that resolves such link (canonical() fails). In this corner case we skip the "atomic" approach of renaming the file and write the link target directly. Closes #10787 |
||
---|---|---|
.. | ||
alphabet.txt | ||
expect.txt | ||
README.md | ||
web.txt |
The contents of each .txt
file in this directory are merged together.
- alphabet is a sample for alphabet related items
- web is a sample for web/html related items
- expect is the main list of expected items -- there is nothing particularly special about the file name (beyond the extension which is important).
These terms are things which temporarily exist in the project, but which aren't necessarily words.
If something is a word that could come and go, it probably belongs in a dictionary.