diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 07:34:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 07:34:29 +0000 |
commit | b40c8769f2e4fb589de2263b7d8088d0c69ae6e3 (patch) | |
tree | 22c6eacfdac15bf24efde50cee4af7d9af38698b /src/lib/nt/ntopenat.c | |
parent | Releasing progress-linux version 1:0.1.9998svn3589+dfsg-1~progress7.99u1. (diff) | |
download | kbuild-b40c8769f2e4fb589de2263b7d8088d0c69ae6e3.tar.xz kbuild-b40c8769f2e4fb589de2263b7d8088d0c69ae6e3.zip |
Merging upstream version 1:0.1.9998svn3604+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/lib/nt/ntopenat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/nt/ntopenat.c b/src/lib/nt/ntopenat.c index 6db4de7..07ae561 100644 --- a/src/lib/nt/ntopenat.c +++ b/src/lib/nt/ntopenat.c @@ -55,9 +55,10 @@ static int birdOpenInt(const char *pszPath, int fFlags, unsigned __int16 fMode) * directories as the CRT doesn't allow doing that.
*/
int const iErrnoSaved = errno;
+ int iErrno;
int fd = open(pszPath, fFlags, fMode);
if ( fd < 0
- && (errno == EACCES || errno == ENOENT || errno == EISDIR)
+ && ((iErrno = errno) == EACCES || iErrno == ENOENT || iErrno == EISDIR || iErrno == EINVAL /*CIFS*/)
&& (fFlags & (_O_WRONLY | _O_RDWR | _O_RDONLY)) == _O_RDONLY
&& (fFlags & (_O_CREAT | _O_TRUNC | _O_EXCL)) == 0 )
{
|