Keep file permissions when extracting zip archives on Unix (#31304)
Follow-up of https://github.com/zed-industries/zed/pull/31080 Stop doing ```rs #[cfg(not(windows))] { file.set_permissions(<fs::Permissions as fs::unix::PermissionsExt>::from_mode( 0o755, )) .await?; } ``` after extracting zip archives on Unix, and use an API that provides the file permissions data for each archive entry. Release Notes: - N/A
This commit is contained in:
parent
ca72efe701
commit
7341ab3980
10 changed files with 150 additions and 91 deletions
|
@ -271,14 +271,6 @@ pub async fn get_supermaven_agent_path(client: Arc<dyn HttpClient>) -> Result<Pa
|
|||
.await
|
||||
.with_context(|| format!("Unable to write binary to file at {:?}", binary_path))?;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
file.set_permissions(<fs::Permissions as fs::unix::PermissionsExt>::from_mode(
|
||||
0o755,
|
||||
))
|
||||
.await?;
|
||||
}
|
||||
|
||||
let mut old_binary_paths = fs::read_dir(supermaven_dir()).await?;
|
||||
while let Some(old_binary_path) = old_binary_paths.next().await {
|
||||
let old_binary_path = old_binary_path?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue