basic/mkdir: simplify error handling
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 29 Mar 2023 14:00:03 +0000 (16:00 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 3 Apr 2023 13:28:00 +0000 (15:28 +0200)
commit2c71aa77a5f600ad151f9d28e449cb96bf60e8d8
tree88c54df52e70d531d6b75328372d1d36e33d4057
parentacbb504eaf1be51572b1c0d0d490ac478bc41c64
basic/mkdir: simplify error handling

If we created the dir successfully, we let chmod_and_chown_at() do its thing
and shouldn't go into the part where we check if the existing directory has the
right permissions and ownership and possibly adjust them. The code was doing
that, by relying on the fact that chmod_and_chown_at() does not return -EEXIST.
That's probably true, but seems unnecessarilly complicated.

Follow-up for c1b1492a94b43ca636eb383c3b058feff27ff7b1.
src/basic/mkdir.c