Skip to content

Commit

Permalink
logfix:print warn instead of error when dir not found.
Browse files Browse the repository at this point in the history
Signed-off-by: liuxu <liuxu156@huawei.com>
  • Loading branch information
liuxu committed Dec 17, 2024
1 parent 4ad477e commit 70b4d5f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vmm/sandbox/src/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ where
let mut subs = match tokio::fs::read_dir(dir).await {
Ok(subs) => subs,
Err(e) => {
error!("FATAL! read working dir {} for recovery: {}", dir, e);
return;
if e.kind() == ErrorKind::NotFound {
warn!("WARN! read working dir {} for recovery: {}", dir, e);
return;
} else {
error!("FATAL! read working dir {} for recovery: {}", dir, e);
return;
}
}
};
while let Some(entry) = subs.next_entry().await.unwrap() {
Expand Down

0 comments on commit 70b4d5f

Please sign in to comment.