diff --git a/known-folders.zig b/known-folders.zig index 429cdfe..aefe7dd 100644 --- a/known-folders.zig +++ b/known-folders.zig @@ -97,14 +97,14 @@ pub fn getPath(allocator: std.mem.Allocator, folder: KnownFolder) Error!?[]const if (env_path.subdir) |sub_dir| { const root_path = std.process.getEnvVarOwned(arena.allocator(), env_path.env_var) catch |err| switch (err) { error.EnvironmentVariableNotFound => return null, - error.InvalidUtf8 => return null, + error.InvalidWtf8 => return null, error.OutOfMemory => |e| return e, }; return try std.fs.path.join(allocator, &[_][]const u8{ root_path, sub_dir }); } else { return std.process.getEnvVarOwned(allocator, env_path.env_var) catch |err| switch (err) { error.EnvironmentVariableNotFound => return null, - error.InvalidUtf8 => return null, + error.InvalidWtf8 => return null, error.OutOfMemory => |e| return e, }; }