Eliminate wopen()

It was large and mostly unnecessary. Prefer wopen() followed by
fdopen().
This commit is contained in:
ridiculousfish
2020-01-28 10:43:37 -08:00
parent af2265b4b0
commit fc4557c784
5 changed files with 13 additions and 49 deletions

View File

@@ -3369,7 +3369,7 @@ static void test_universal_ok_to_save() {
say(L"Testing universal Ok to save");
if (system("mkdir -p test/fish_uvars_test/")) err(L"mkdir failed");
const char *contents = "# VERSION: 99999.99\n";
FILE *fp = wfopen(UVARS_TEST_PATH, "w");
FILE *fp = fopen(wcs2string(UVARS_TEST_PATH).c_str(), "w");
assert(fp && "Failed to open UVARS_TEST_PATH for writing");
fwrite(contents, std::strlen(contents), 1, fp);
fclose(fp);