Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Tolerate errors when attempting to fetch metadata for `CreateKind::An…
Browse files Browse the repository at this point in the history
…y` or `CreateKind::Other`
  • Loading branch information
DrChat committed Aug 8, 2023
1 parent 8980988 commit de7a4c4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/agent/onefuzz/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,11 @@ impl DirectoryMonitor {
return Ok(Some(path));
}

// check if it is a file
let metadata = fs::metadata(&path)
.await
.context("checking metadata for file")?;

if metadata.is_file() {
return Ok(Some(path));
if let Ok(metadata) = fs::metadata(&path).await {
// check if it is a file
if metadata.is_file() {
return Ok(Some(path));
}
}
}
}
Expand Down

0 comments on commit de7a4c4

Please sign in to comment.