From 5acd52fcf70b505f15babb3b29141c5159d65d9e Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 15 Nov 2008 17:05:33 +0000 Subject: [PATCH] DEVEL15-windows-error-mapping-20081115 LICENSE MIT do not map success (0) to an error (cherry picked from commit 17b8c16000461c5b7908cdb3d923bba9a03122b5) --- src/WINNT/afsd/smb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 67db150ad..77ee01178 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -2989,7 +2989,10 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) /* map CM_ERROR_* errors to NT 32-bit status codes */ /* NT Status codes are listed in ntstatus.h not winerror.h */ - if (code == CM_ERROR_NOSUCHCELL) { + if (code == 0) { + NTStatus = 0; + } + else if (code == CM_ERROR_NOSUCHCELL) { NTStatus = 0xC000000FL; /* No such file */ } else if (code == CM_ERROR_NOSUCHVOLUME) { -- 2.39.5