tools: log rotate: fix file ending for compressed files

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-02 17:45:02 +01:00
parent 645a47ff6e
commit 1dc2fe20dd

View File

@ -107,7 +107,7 @@ impl LogRotate {
for i in 2..count { for i in 2..count {
if filenames[i].extension().unwrap_or(std::ffi::OsStr::new("")) != "zst" { if filenames[i].extension().unwrap_or(std::ffi::OsStr::new("")) != "zst" {
let mut target = filenames[i].clone().into_os_string(); let mut target = filenames[i].clone().into_os_string();
target.push(".zstd"); target.push(".zst");
Self::compress(&filenames[i], &target.into(), &options)?; Self::compress(&filenames[i], &target.into(), &options)?;
} }
} }