mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Add support for the "x" flag in std.open()
This commit is contained in:
parent
92577d33ff
commit
4968ef6e90
1 changed files with 1 additions and 1 deletions
|
@ -1024,7 +1024,7 @@ static JSValue js_std_open(JSContext *ctx, JSValue this_val,
|
||||||
mode = JS_ToCString(ctx, argv[1]);
|
mode = JS_ToCString(ctx, argv[1]);
|
||||||
if (!mode)
|
if (!mode)
|
||||||
goto fail;
|
goto fail;
|
||||||
if (mode[strspn(mode, "rwa+b")] != '\0') {
|
if (mode[strspn(mode, "rwa+bx")] != '\0') {
|
||||||
JS_ThrowTypeError(ctx, "invalid file mode");
|
JS_ThrowTypeError(ctx, "invalid file mode");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue