adapt to proxmox-apt changes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-07-21 12:52:37 +02:00
parent 8d143f8f9e
commit 03bba92a8b

View File

@ -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);