From 03bba92a8bd8ac6dabaf86c2141ebd9030f41dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 21 Jul 2022 12:52:37 +0200 Subject: [PATCH] adapt to proxmox-apt changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- common/src/apt/repositories.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/apt/repositories.rs b/common/src/apt/repositories.rs index 26a20e4..e162487 100644 --- a/common/src/apt/repositories.rs +++ b/common/src/apt/repositories.rs @@ -104,7 +104,7 @@ pub mod export { ); } - if let Some(file) = files.iter_mut().find(|file| file.path == path) { + if let Some(file) = files.iter_mut().find(|file| file.path.as_ref() == Some(&path)) { file.repositories.push(repo); file.write()?; @@ -145,7 +145,7 @@ pub mod export { bail!("unable to parse file {} - {}", error.path, error.error); } - if let Some(file) = files.iter_mut().find(|file| file.path == path) { + if let Some(file) = files.iter_mut().find(|file| file.path.as_ref() == Some(&path.to_string())) { if let Some(repo) = file.repositories.get_mut(index) { if let Some(enabled) = options.enabled { repo.set_enabled(enabled);