]> git.proxmox.com Git - proxmox.git/commitdiff
proxmox-sys: fix test for wrong logrotate path
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Nov 2021 09:29:24 +0000 (10:29 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Nov 2021 09:35:45 +0000 (10:35 +0100)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
proxmox-sys/src/logrotate.rs

index 5d383d4f83fe2a1eb3cbfddc5566b58879ced4c1..1062c0a34964129d7897c6e4eb87e22644c1fd07 100644 (file)
@@ -29,7 +29,7 @@ impl LogRotate {
         max_files: Option<usize>,
         options: Option<CreateOptions>,
     ) -> Result<Self, Error> {
-        if path.as_ref().file_name().is_some() {
+        if path.as_ref().file_name().is_none() {
             bail!("logrotate path does not contain a file name");
         }
         Ok(Self {