You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if options.contains(.withoutOverwriting) && options.contains(.atomic){
fatalError("withoutOverwriting is not supported with atomic")
}
Severe, source breaking bug here. In 5.10 and below, [.atomic, .withoutOverwriting] worked just fine (possibly not achieving the desired behaviour). We've got to back out this change because
It's source breaking (works in 5.10, crashes in 6.0)
The docs don't mention that .atomic and .withoutOverwriting are mutually exclusive
They shouldn't be mutually exclusive
3.1. On Linux, the man page for open's example for O_TMPFILE contains how to implement [.atomic, .withoutOverwriting]
3.2. On systems that lack O_TMPFILE, this can still be approximated with write to .tmp_XXXXXX, then rename tmp file (and remove if that fails). That still prevents half-written files
The text was updated successfully, but these errors were encountered:
swift-foundation/Sources/FoundationEssentials/Data/Data.swift
Lines 2445 to 2447 in c0532f8
Severe, source breaking bug here. In 5.10 and below,
[.atomic, .withoutOverwriting]
worked just fine (possibly not achieving the desired behaviour). We've got to back out this change because.atomic
and.withoutOverwriting
are mutually exclusive3.1. On Linux, the man page for open's example for
O_TMPFILE
contains how to implement[.atomic, .withoutOverwriting]
3.2. On systems that lack
O_TMPFILE
, this can still be approximated with write to.tmp_XXXXXX
, then rename tmp file (and remove if that fails). That still prevents half-written filesThe text was updated successfully, but these errors were encountered: