diff options
Diffstat (limited to 'libs/libmdbx/src/test/osal-unix.cc')
-rw-r--r-- | libs/libmdbx/src/test/osal-unix.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/libmdbx/src/test/osal-unix.cc b/libs/libmdbx/src/test/osal-unix.cc index dc0774063a..757c8583c0 100644 --- a/libs/libmdbx/src/test/osal-unix.cc +++ b/libs/libmdbx/src/test/osal-unix.cc @@ -517,9 +517,9 @@ std::string osal_tempdir(void) { tempdir = getenv("TEMPDIR"); if (!tempdir) tempdir = getenv("TEMP"); - if (tempdir) { + if (tempdir && *tempdir) { std::string dir(tempdir); - if (!dir.empty() && dir.at(dir.length() - 1) != '/') + if (dir.back() != '/') dir.append("/"); return dir; } |