fix panic caused by remove_dir_all_recursive
This commit is contained in:
parent
caa4b529e4
commit
5b11025288
5 changed files with 15 additions and 10 deletions
|
@ -78,8 +78,9 @@ impl GlslExtension {
|
|||
|
||||
zed::make_file_executable(&binary_path)?;
|
||||
|
||||
let entries =
|
||||
fs::read_dir(".").map_err(|e| format!("failed to list working directory {e}"))?;
|
||||
let entries: Vec<_> = fs::read_dir(".")
|
||||
.map_err(|e| format!("failed to list working directory {e}"))?
|
||||
.collect();
|
||||
for entry in entries {
|
||||
let entry = entry.map_err(|e| format!("failed to load directory entry {e}"))?;
|
||||
if entry.file_name().to_str() != Some(&version_dir) {
|
||||
|
|
|
@ -106,8 +106,9 @@ impl RuffExtension {
|
|||
zed::download_file(&asset.download_url, &version_dir, file_kind)
|
||||
.map_err(|e| format!("failed to download file: {e}"))?;
|
||||
|
||||
let entries =
|
||||
fs::read_dir(".").map_err(|e| format!("failed to list working directory {e}"))?;
|
||||
let entries: Vec<_> = fs::read_dir(".")
|
||||
.map_err(|e| format!("failed to list working directory {e}"))?
|
||||
.collect();
|
||||
for entry in entries {
|
||||
let entry = entry.map_err(|e| format!("failed to load directory entry {e}"))?;
|
||||
if entry.file_name().to_str() != Some(&version_dir) {
|
||||
|
|
|
@ -72,8 +72,9 @@ impl SnippetExtension {
|
|||
)
|
||||
.map_err(|e| format!("failed to download file: {e}"))?;
|
||||
|
||||
let entries =
|
||||
fs::read_dir(".").map_err(|e| format!("failed to list working directory {e}"))?;
|
||||
let entries: Vec<_> = fs::read_dir(".")
|
||||
.map_err(|e| format!("failed to list working directory {e}"))?
|
||||
.collect();
|
||||
for entry in entries {
|
||||
let entry = entry.map_err(|e| format!("failed to load directory entry {e}"))?;
|
||||
if entry.file_name().to_str() != Some(&version_dir) {
|
||||
|
|
|
@ -74,8 +74,9 @@ impl TestExtension {
|
|||
)
|
||||
.map_err(|e| format!("failed to download file: {e}"))?;
|
||||
|
||||
let entries =
|
||||
fs::read_dir(".").map_err(|e| format!("failed to list working directory {e}"))?;
|
||||
let entries: Vec<_> = fs::read_dir(".")
|
||||
.map_err(|e| format!("failed to list working directory {e}"))?
|
||||
.collect();
|
||||
for entry in entries {
|
||||
let entry = entry.map_err(|e| format!("failed to load directory entry {e}"))?;
|
||||
if entry.file_name().to_str() != Some(&version_dir) {
|
||||
|
|
|
@ -108,8 +108,9 @@ impl TomlExtension {
|
|||
|
||||
zed::make_file_executable(&binary_path)?;
|
||||
|
||||
let entries = fs::read_dir(".")
|
||||
.map_err(|err| format!("failed to list working directory {err}"))?;
|
||||
let entries: Vec<_> = fs::read_dir(".")
|
||||
.map_err(|err| format!("failed to list working directory {err}"))?
|
||||
.collect();
|
||||
for entry in entries {
|
||||
let entry = entry.map_err(|err| format!("failed to load directory entry {err}"))?;
|
||||
if entry.file_name().to_str() != Some(&version_dir) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue