summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-04-29 04:42:56 -0700
committerGitHub <noreply@github.com>2021-04-29 13:42:56 +0200
commite4db733d80d0b70192ac7eb4094a46269fe7cd5b (patch)
treeb60bdb281a29ac34be393c38a00ebbe3e53c9402 /lib/pure
parent5edddd68d04648553bc02d52cd53d3a1a14102f3 (diff)
downloadNim-e4db733d80d0b70192ac7eb4094a46269fe7cd5b.tar.gz
fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile (#17889)
* fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile

* fix for tests/async/tasyncfile.nim

* hide mode for now

* add notice regarding stability
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/streams.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim
index eb1c9cc14..3cc5ea038 100644
--- a/lib/pure/streams.nim
+++ b/lib/pure/streams.nim
@@ -1503,6 +1503,7 @@ when false:
       of fmReadWrite: flags = O_RDWR or int(O_CREAT)
       of fmReadWriteExisting: flags = O_RDWR
       of fmAppend: flags = O_WRONLY or int(O_CREAT) or O_APPEND
+      static: doAssert false # handle bug #17888
       var handle = open(filename, flags)
       if handle < 0: raise newEOS("posix.open() call failed")
     result = newFileHandleStream(handle)