]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - db2/os/db_os_dir.c
Update.
[thirdparty/glibc.git] / db2 / os / db_os_dir.c
index 6dabd6204982f7db39a7ad19ad915de4e199bd05..1206e3faa74989aea9d51382a633d3430dd4cd87 100644 (file)
@@ -8,7 +8,7 @@
 #include "config.h"
 
 #ifndef lint
-static const char sccsid[] = "@(#)db_os_dir.c  10.8 (Sleepycat) 8/27/97";
+static const char sccsid[] = "@(#)db_os_dir.c  10.10 (Sleepycat) 9/17/97";
 #endif /* not lint */
 
 #ifndef NO_SYSTEM_INCLUDES
@@ -60,9 +60,11 @@ __db_dir(dbenv, dir, namesp, cntp)
        struct _finddata_t fdata;
        long dirhandle;
        int finished;
+       char filespec[MAX_PATH];
 
-       if ((dirhandle = _findfirst(dir, &fdata)) == -1) {
-               __db_err(dbenv, "%s: %s", dir, strerror(errno));
+       (void)snprintf(filespec, sizeof(filespec), "%s/*", dir);
+       if ((dirhandle = _findfirst(filespec, &fdata)) == -1) {
+               __db_err(dbenv, "%s: %s", filespec, strerror(errno));
                return (errno);
        }