Let's try canonicalizing file paths in the manifest too...

This commit is contained in:
Chris Fallin
2021-11-16 15:22:43 -08:00
parent bc56ab743c
commit 1697e32afa

View File

@@ -189,12 +189,8 @@ impl IsleCompilation {
// One line in the manifest: <filename> <sha-512 hash>. // One line in the manifest: <filename> <sha-512 hash>.
let mut hasher = Sha512::default(); let mut hasher = Sha512::default();
hasher.update(content.as_bytes()); hasher.update(content.as_bytes());
writeln!( let filename = format!("{}", filename.display()).replace("\\", "/");
&mut manifest, writeln!(&mut manifest, "{} {:x}", filename, hasher.finalize())?;
"{} {:x}",
filename.display(),
hasher.finalize()
)?;
} }
Ok(manifest) Ok(manifest)