From f4e8982e5c86bb2a37ef9b177d8ed4da9f0d943f Mon Sep 17 00:00:00 2001 From: Krzysztof Wolicki Date: Mon, 26 Feb 2024 18:01:06 +0100 Subject: [PATCH] Windows Utf8 -> Wtf8 --- src/os/homedir.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/homedir.zig b/src/os/homedir.zig index 854c7d62c..1542ab77e 100644 --- a/src/os/homedir.zig +++ b/src/os/homedir.zig @@ -88,7 +88,7 @@ fn homeWindows(buf: []u8) !?[]u8 { const fba = fba_instance.allocator(); const drive = std.process.getEnvVarOwned(fba, "HOMEDRIVE") catch |err| switch (err) { error.OutOfMemory => return Error.BufferTooSmall, - error.InvalidUtf8, error.EnvironmentVariableNotFound => return null, + error.InvalidWtf8, error.EnvironmentVariableNotFound => return null, }; // could shift the contents if this ever happens if (drive.ptr != buf.ptr) @panic("codebug"); @@ -101,7 +101,7 @@ fn homeWindows(buf: []u8) !?[]u8 { const fba = fba_instance.allocator(); const homepath = std.process.getEnvVarOwned(fba, "HOMEPATH") catch |err| switch (err) { error.OutOfMemory => return Error.BufferTooSmall, - error.InvalidUtf8, error.EnvironmentVariableNotFound => return null, + error.InvalidWtf8, error.EnvironmentVariableNotFound => return null, }; // could shift the contents if this ever happens if (homepath.ptr != path_buf.ptr) @panic("codebug");