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:
Kirill Bulatov 2025-05-23 23:45:32 +03:00 committed by GitHub
parent ca72efe701
commit 7341ab3980
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 150 additions and 91 deletions

View file

@ -376,12 +376,6 @@ impl ImageStore {
entry.insert(rx.clone());
let project_path = project_path.clone();
// TODO kb this is causing another error, and we also pass a worktree nearby — seems ok to pass "" here?
// let image_path = worktree
// .read(cx)
// .absolutize(&project_path.path)
// .map(Arc::from)
// .unwrap_or_else(|_| project_path.path.clone());
let load_image = self
.state
.open_image(project_path.path.clone(), worktree, cx);