Ignore if the dir we are trying remove doesn't exist.

Fixes: 126208830
Test: manual
Change-Id: I34788ebb2dd42e62ee3061f7d81dc03047048c3b
This commit is contained in:
Sudheer Shanka 2019-02-25 12:21:23 -08:00
parent 30df1c61d9
commit 8255a2b0bb

View file

@ -902,7 +902,7 @@ status_t DeleteDirContentsAndDir(const std::string& pathname) {
if (res < 0) {
return res;
}
if (rmdir(pathname.c_str()) != 0) {
if (TEMP_FAILURE_RETRY(rmdir(pathname.c_str())) < 0 && errno != ENOENT) {
PLOG(ERROR) << "rmdir failed on " << pathname;
return -errno;
}