Skip to content

Commit

Permalink
delete already present files from library index (#4955)
Browse files Browse the repository at this point in the history
  • Loading branch information
awestover authored Aug 10, 2023
1 parent 71f9d9e commit 17aea78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compute_tools/src/extension_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub async fn get_available_extensions(
let ext_index_full = serde_json::from_slice::<Index>(&ext_idx_buffer)?;
let mut enabled_extensions = ext_index_full.public_extensions;
enabled_extensions.extend_from_slice(custom_extensions);
let library_index = ext_index_full.library_index;
let mut library_index = ext_index_full.library_index;
let all_extension_data = ext_index_full.extension_data;
info!("library_index: {:?}", library_index);

Expand All @@ -179,6 +179,8 @@ pub async fn get_available_extensions(
file_create_tasks.push(tokio::fs::write(control_path, control_contents));
} else {
warn!("control file {:?} exists both locally and remotely. ignoring the remote version.", control_file);
// also delete this from library index
library_index.retain(|_, value| value != extension_name);
}
}
}
Expand Down

1 comment on commit 17aea78

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1332 tests run: 1251 passed, 0 failed, 81 skipped (full report)


The comment gets automatically updated with the latest test results
17aea78 at 2023-08-10T14:25:23.166Z :recycle:

Please sign in to comment.