{"version":"2.1.239","anchor":"downloads-no-longer-overwrite-an-existing-file","canonical_anchor":"downloads-no-longer-overwrite-an-existing-file","heading":"Downloads no longer overwrite an existing file","tier":"notice","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239\/e\/downloads-no-longer-overwrite-an-existing-file","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239","markdown":"### Downloads no longer overwrite an existing file\n\nDownloads now fail rather than silently truncating a file that already exists.\n\n**What**\n\nUpdate and asset downloads now open the destination with an exclusive-create flag, so a download into a path that already exists fails instead of truncating whatever was there.\n\n**Details**\n\n- The write stream is created with `{ flags: \"wx\" }`, which errors rather than replacing an existing target.\n\n**Evidence**\n\n`createWriteStream(t, { flags: \"wx\" })`\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5"}