separator bug fix
This commit is contained in:
parent
1a1f199ad1
commit
418d23fdc5
2 changed files with 8 additions and 7 deletions
Binary file not shown.
15
src/main.rs
15
src/main.rs
|
@ -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<()> {
|
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' };
|
let sep = if separator_null { '\0' } else { '\n' };
|
||||||
if quote { for (_,file) in &self.registry {
|
for (_, file) in &self.registry {
|
||||||
writer.write_all(&shlex::bytes::try_quote(&file.as_os_str().as_bytes()).unwrap())?;
|
if quote {
|
||||||
} }
|
writer.write_all(&shlex::bytes::try_quote(&file.as_os_str().as_bytes()).unwrap())?;
|
||||||
else { for (_,file) in &self.registry {
|
} else {
|
||||||
writer.write_all(file.as_os_str().as_bytes())?;
|
writer.write_all(file.as_os_str().as_bytes())?;
|
||||||
} }
|
}
|
||||||
write!(writer, "{}", sep)?;
|
write!(writer, "{}", sep)?;
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue