diff --git a/repertory/librepertory/src/drives/fuse/fuse_drive.cpp b/repertory/librepertory/src/drives/fuse/fuse_drive.cpp index f3460024..476fb48a 100644 --- a/repertory/librepertory/src/drives/fuse/fuse_drive.cpp +++ b/repertory/librepertory/src/drives/fuse/fuse_drive.cpp @@ -137,12 +137,15 @@ auto fuse_drive::create_impl(std::string api_path, mode_t mode, } if (is_create_op) { - if ((res = check_access(api_path, W_OK)) == api_error::item_not_found) { + res = check_access(api_path, W_OK); + if (res == api_error::item_not_found) { res = check_parent_access(api_path, W_OK); } - } else if ((res = check_access(api_path, R_OK)) == - api_error::item_not_found) { - res = check_parent_access(api_path, R_OK); + } else { + res = res = check_access(api_path, R_OK); + if (res == api_error::item_not_found) { + res = check_parent_access(api_path, R_OK); + } } if (res != api_error::success) {