Skip to content

Commit

Permalink
fix windows compile
Browse files Browse the repository at this point in the history
  • Loading branch information
gvilums committed Feb 3, 2024
1 parent 948665a commit 08c460c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/resolver/resolve_path.zig
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,14 @@ pub fn normalizeStringGenericT(

pub fn NormalizeOptions(comptime T: type) type {
return struct {
const This = @This();
allow_above_root: bool = false,
separator: T = std.fs.path.sep,
isSeparator: fn (T) bool = struct {
fn call(char: T) bool {
return char == This.separator;
return if (comptime std.fs.path.sep == std.fs.path.sep_windows)
char == '\\' or char == '/'
else
char == '/';
}
}.call,
preserve_trailing_slash: bool = false,
Expand Down

0 comments on commit 08c460c

Please sign in to comment.