Skip to content

Commit

Permalink
fix: reduce amount of layout step failures on windows (#59)
Browse files Browse the repository at this point in the history
Hitting the panic "Failed to find a parent section match for a page"
in `cache.zig` due to comparing two paths with different
directory separators.
  • Loading branch information
Atomk authored Sep 29, 2024
1 parent e75ea98 commit 155f478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exes/layout/cache.zig
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ fn loadPage(
hash.update(ml.code);
},
}
if (std.mem.endsWith(u8, md_rel_path, "/index.smd")) {
if (std.mem.endsWith(u8, md_rel_path, std.fs.path.sep_str ++ "index.smd")) {
hash.update(std.fs.path.dirname(path_to_hash) orelse "");
} else {
hash.update(path_to_hash);
Expand Down

0 comments on commit 155f478

Please sign in to comment.