]> git.proxmox.com Git - proxmox-backup.git/commitdiff
pxar: fix missing newlines in warnings
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 30 Jun 2020 12:37:20 +0000 (14:37 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 30 Jun 2020 12:37:20 +0000 (14:37 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/pxar/create.rs

index a9fbaa69d8372ea2f6c8c44f4ba603bcb79f91d2..b3cc12a406a76f693c9a142b1a2d63e4de0e2c96 100644 (file)
@@ -263,7 +263,7 @@ impl<'a, 'b> Archiver<'a, 'b> {
             Ok(fd) => Ok(Some(fd)),
             Err(nix::Error::Sys(Errno::ENOENT)) => Ok(None),
             Err(nix::Error::Sys(Errno::EACCES)) => {
-                write!(self.errors, "failed to open file: {:?}: access denied", file_name)?;
+                writeln!(self.errors, "failed to open file: {:?}: access denied", file_name)?;
                 Ok(None)
             }
             Err(other) => Err(Error::from(other)),
@@ -287,7 +287,7 @@ impl<'a, 'b> Archiver<'a, 'b> {
                 let line = match line {
                     Ok(line) => line,
                     Err(err) => {
-                        let _ = write!(
+                        let _ = writeln!(
                             self.errors,
                             "ignoring .pxarexclude after read error in {:?}: {}",
                             self.path,
@@ -307,7 +307,7 @@ impl<'a, 'b> Archiver<'a, 'b> {
                 match MatchEntry::parse_pattern(line, PatternFlag::PATH_NAME, MatchType::Exclude) {
                     Ok(pattern) => self.patterns.push(pattern),
                     Err(err) => {
-                        let _ = write!(self.errors, "bad pattern in {:?}: {}", self.path, err);
+                        let _ = writeln!(self.errors, "bad pattern in {:?}: {}", self.path, err);
                     }
                 }
             }
@@ -410,12 +410,12 @@ impl<'a, 'b> Archiver<'a, 'b> {
     }
 
     fn report_vanished_file(&mut self) -> Result<(), Error> {
-        write!(self.errors, "warning: file vanished while reading: {:?}", self.path)?;
+        writeln!(self.errors, "warning: file vanished while reading: {:?}", self.path)?;
         Ok(())
     }
 
     fn report_file_shrunk_while_reading(&mut self) -> Result<(), Error> {
-        write!(
+        writeln!(
             self.errors,
             "warning: file size shrunk while reading: {:?}, file will be padded with zeros!",
             self.path,
@@ -424,7 +424,7 @@ impl<'a, 'b> Archiver<'a, 'b> {
     }
 
     fn report_file_grew_while_reading(&mut self) -> Result<(), Error> {
-        write!(
+        writeln!(
             self.errors,
             "warning: file size increased while reading: {:?}, file will be truncated!",
             self.path,