mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
ITS#9385 fix using MDB_NOSUBDIR with nonexistent file
This commit is contained in:
parent
e2b82098fa
commit
64fc67f4ae
1 changed files with 1 additions and 4 deletions
|
|
@ -5995,11 +5995,8 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode
|
|||
#ifndef _WIN32
|
||||
{
|
||||
struct stat st;
|
||||
rc = stat(path, &st);
|
||||
if (rc)
|
||||
return ErrCode();
|
||||
flags &= ~MDB_RAWPART;
|
||||
if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode))
|
||||
if (!stat(path, &st) && (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)))
|
||||
flags |= MDB_RAWPART | MDB_NOSUBDIR;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue