+ if (bdb->bi_dbenv_home[0] == '.') {
+ /* If home is a relative path, relative subdirs
+ * are just concat'd by BDB. We don't want the
+ * path to be concat'd twice, e.g.
+ * ./test-db/./test-db/tmp
+ */
+ ptr = dir;
+ } else {
+ ptr = lutil_strcopy( dir, bdb->bi_dbenv_home );
+ *ptr++ = LDAP_DIRSEP[0];
+#ifdef HAVE_EBCDIC
+ __atoe( dir );
+#endif
+ }
+
+ strcpy( ptr, BDB_TMP_SUBDIR );
+#ifdef HAVE_EBCDIC
+ __atoe( ptr );
+#endif