Skip to content

Commit

Permalink
Merge pull request #121 from ethangreen-dev/make-dir-interp-hacky
Browse files Browse the repository at this point in the history
fix: change patch dir interp to be backwards compat
  • Loading branch information
ethangreen-dev authored Jan 19, 2025
2 parents 18103f0 + 3cf8b63 commit d08f644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/lovely-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ impl PatchTable {
panic!("Failed to read patch file at {patch_file:?}:\n{e:?}")
});

// HACK: Replace instances of {{lovely:patch_file_path}} with patch_file.
// HACK: Replace instances of {{lovely_hack:patch_dir}} with mod directory.
let clean_mod_dir = &mod_dir.to_string_lossy().replace("\\", "\\\\");
let str = str.replace("{{lovely:mod_dir}}", clean_mod_dir);
let str = str.replace("{{lovely_hack:patch_dir}}", clean_mod_dir);

// Handle invalid fields in a non-explosive way.
let ignored_key_callback = |key: serde_ignored::Path| {
Expand Down

0 comments on commit d08f644

Please sign in to comment.