{"version":"2.1.223","anchor":"atomic-file-writes-no-longer-copy-through-the-temp-file-on-t","canonical_anchor":"atomic-file-writes-no-longer-copy-through-the-temp-file-on-t","heading":"Atomic file writes no longer copy through the temp file on the fallback path","tier":"notice","area":"File Writes","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.223\/e\/atomic-file-writes-no-longer-copy-through-the-temp-file-on-t","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.223","markdown":"### Atomic file writes no longer copy through the temp file on the fallback path\n\nFile writes are safer on the fallback path and refuse to follow a symlink at the destination.\n\n**What**\n\nWhen rename fails, the atomic-write fallback now writes content straight to the destination instead of copying the temp file over it.\n\n**Details**\n\n- applies to both the sync and async fallbacks\n- the destination is opened with `O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW`, so a symlink at the path is refused rather than followed\n- permissions are applied by chmod on the open descriptor\n- on failure the descriptor is closed and the partial destination is unlinked\n\n**Evidence**\n\n`U1.constants.O_NOFOLLOW`\n\n- Area: File Writes\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 0\/5"}