}
/*d_printf(">>>mkdir: resolved path as %s\n", targetpath);*/
- if (!NT_STATUS_IS_OK(cli_mkdir(targetcli, targetpath))) {
- errno = SMBC_errno(context, targetcli);
+ status = cli_mkdir(targetcli, targetpath);
+ if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(frame);
+ errno = cli_status_to_errno(status);
return -1;
}