Skip to content

Commit

Permalink
InvalidUtf8 -> InvalidWtf8
Browse files Browse the repository at this point in the history
  • Loading branch information
der-teufel-programming authored and Techatrix committed Feb 27, 2024
1 parent 2aa7f2e commit 055c95a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions known-folders.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}
Expand Down

0 comments on commit 055c95a

Please sign in to comment.