mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
libsmb: Avoid a call to SMBC_errno()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
c78f0a96a3
commit
3844fe8730
@ -2242,9 +2242,14 @@ SMBC_unlink_ctx(SMBCCTX *context,
|
||||
}
|
||||
/*d_printf(">>>unlink: resolved path as %s\n", targetpath);*/
|
||||
|
||||
if (!NT_STATUS_IS_OK(cli_unlink(targetcli, targetpath, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
|
||||
status = cli_unlink(
|
||||
targetcli,
|
||||
targetpath,
|
||||
FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
|
||||
|
||||
errno = SMBC_errno(context, targetcli);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
|
||||
errno = cli_status_to_errno(status);
|
||||
|
||||
if (errno == EACCES) { /* Check if the file is a directory */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user