Commit ca6b12e2 authored by Сковорода Никита Андреевич's avatar Сковорода Никита Андреевич
Browse files

fs: remove broken code in promises/write

That code expects the last argument to be a callback.
When it's not a callback, it shifts arguments, defaulting
encoding to 'utf-8', which is clearly broken.

Old signature: (fd, string[, position[, encoding]], callback)
New signature: (fd, string[, position[, encoding]])

PR-URL: https://github.com/nodejs/node/pull/20407


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJamie Davis <davisjam@vt.edu>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
parent dd037091
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment