Skip to content

Commit 94a8133

Browse files
committed
Fix issue
1 parent 62e59f8 commit 94a8133

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rewatch/src/build/packages.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,13 @@ pub fn parse_packages(build_state: &mut BuildState) {
757757
} else {
758758
// remove last character of string: resi -> res, rei -> re, mli -> ml
759759
let mut implementation_filename = file.to_owned();
760-
implementation_filename.pop();
760+
let extension = implementation_filename.extension().unwrap().to_str().unwrap();
761+
implementation_filename = match extension {
762+
"resi" => implementation_filename.with_extension("res"),
763+
"rei" => implementation_filename.with_extension("re"),
764+
"mli" => implementation_filename.with_extension("ml"),
765+
_ => implementation_filename,
766+
};
761767
match source_files.get(&implementation_filename) {
762768
None => {
763769
log::warn!(

0 commit comments

Comments
 (0)