adapt to proxmox-apt change

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-07-21 12:05:49 +02:00
parent 480f1552f8
commit 5616dca6b7
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ proxmox-compression = "0.1"
proxmox-acme-rs = "0.4"
proxmox-apt = "0.8.0"
proxmox-apt = "0.9.0"
proxmox-async = "0.4"
proxmox-openid = "0.9.0"

View File

@ -554,7 +554,7 @@ pub fn add_repository(handle: APTRepositoryHandle, digest: Option<String>) -> Re
);
}
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()?;
@ -622,7 +622,7 @@ pub fn change_repository(
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)) {
if let Some(repo) = file.repositories.get_mut(index) {
if let Some(enabled) = enabled {
repo.set_enabled(enabled);