-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blobfs: ensure blob cache dir exist #358
Conversation
Please help to add commit message:) |
done |
if !path.exists() { | ||
create_dir_all(path).map_err(|e| { | ||
error!("create dir error: {:?}", path); | ||
e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use use macro einval!(e) which shows more verbose message including file!() and line!()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macro einval! is more convenient, but it will lose real error code return from create_dir_all().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with it, but we need to make error!("create dir error: {:?}", path);
more verbose so that we know where goes wrong exactly.
When blob_cache_dir does not exist, create it instead of return error. Signed-off-by: gexuyang <[email protected]>
When blob_cache_dir does not exist, create it instead of return error.
Signed-off-by: gexuyang [email protected]