Merge "Fix logspam when user removed before CE storage prepared"

This commit is contained in:
Eric Biggers 2023-02-24 22:40:59 +00:00 committed by Gerrit Code Review
commit 481a5367a3

View file

@ -114,6 +114,9 @@ static bool prepare_dir(struct selabel_handle* sehandle, mode_t mode, uid_t uid,
static bool rmrf_contents(const std::string& path) {
auto dirp = std::unique_ptr<DIR, int (*)(DIR*)>(opendir(path.c_str()), closedir);
if (!dirp) {
if (errno == ENOENT) {
return true;
}
PLOG(ERROR) << "Unable to open directory: " << path;
return false;
}