Improve xmkdir

This commit is contained in:
topjohnwu
2017-06-30 23:22:51 +08:00
parent 8767a88854
commit 9e1aea33c3
3 changed files with 9 additions and 9 deletions

View File

@@ -307,7 +307,7 @@ int xrename(const char *oldpath, const char *newpath) {
int xmkdir(const char *pathname, mode_t mode) {
int ret = mkdir(pathname, mode);
if (ret == -1) {
if (ret == -1 && errno != EEXIST) {
PLOGE("mkdir %s %u", pathname, mode);
}
return ret;