From b049eb9bbcdaef547c3559e9dbe5a3ca272f60ec Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 16 Jul 2019 06:52:23 -0700 Subject: [PATCH] client: do not return EEXIST for mkdirs Behavior should be similar to `mkdir -p`. Introduced-by: 26905ca82776e8119a347a9a2e8d65c272c7ed62 Signed-off-by: Patrick Donnelly --- src/client/Client.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index a1b2bfee15f2e..bc1914ac99418 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -6655,8 +6655,6 @@ int Client::mkdirs(const char *relpath, mode_t mode, const UserPerm& perms) break; cur.swap(next); } - //check that we have work left to do - if (i==path.depth()) return -EEXIST; if (r!=-ENOENT) return r; ldout(cct, 20) << __func__ << " got through " << i << " directories on path " << relpath << dendl; //make new directory at each level -- 2.39.5