forked from Proxmox/proxmox
proxmox-sys: fix test for wrong logrotate path
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
19c29ab9b2
commit
4d158ec1b3
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user