separator bug fix

This commit is contained in:
ascendforever 2024-10-13 19:17:54 -04:00
parent 1a1f199ad1
commit 418d23fdc5
2 changed files with 8 additions and 7 deletions

Binary file not shown.

View file

@ -82,13 +82,14 @@ impl<'a> Registry<'a> {
pub fn write_all(&self, writer: &mut impl Write, separator_null: bool, quote: bool) -> std::io::Result<()> {
let sep = if separator_null { '\0' } else { '\n' };
if quote { for (_,file) in &self.registry {
writer.write_all(&shlex::bytes::try_quote(&file.as_os_str().as_bytes()).unwrap())?;
} }
else { for (_,file) in &self.registry {
writer.write_all(file.as_os_str().as_bytes())?;
} }
write!(writer, "{}", sep)?;
for (_, file) in &self.registry {
if quote {
writer.write_all(&shlex::bytes::try_quote(&file.as_os_str().as_bytes()).unwrap())?;
} else {
writer.write_all(file.as_os_str().as_bytes())?;
}
write!(writer, "{}", sep)?;
}
Ok(())
}