summaryrefslogtreecommitdiff
path: root/ace/OS_Dirent.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-07-19 02:48:54 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-07-19 02:48:54 +0000
commit21147d626907f3e9b91ce098123a981fc7a7004b (patch)
treedc3f31f1001f62659ef313fed4ccf380c1ee5085 /ace/OS_Dirent.cpp
parent48356131877283979c77c42288c6965b02f9ca2a (diff)
downloadATCD-21147d626907f3e9b91ce098123a981fc7a7004b.tar.gz
ChangeLogTag:Wed Jul 18 13:15:06 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'ace/OS_Dirent.cpp')
-rw-r--r--ace/OS_Dirent.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/ace/OS_Dirent.cpp b/ace/OS_Dirent.cpp
index 07c6c208f65..7da84d715b5 100644
--- a/ace/OS_Dirent.cpp
+++ b/ace/OS_Dirent.cpp
@@ -94,12 +94,12 @@ ACE_OS_Dirent::readdir_emulation (ACE_DIR *d)
while (*d->fdata_.cFileName == '.'
&& retval
&& d->fdata_.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
+ retval = ACE_TEXT_FindNextFile (d->current_handle_, &d->fdata_);
+ if (retval == 0)
{
- retval = ACE_TEXT_FindNextFile (d->current_handle_,
- &(d->fdata_));
+ ::FindClose (d->current_handle_);
+ d->current_handle_ = INVALID_HANDLE_VALUE;
}
- if (retval == 0)
- d->current_handle_ = INVALID_HANDLE_VALUE;
}
d->started_reading_ = 1;
@@ -147,16 +147,10 @@ ACE_OS_Dirent::scandir_emulation (const ACE_TCHAR *dirname,
ACE_DIR *dirp = ACE_OS_Dirent::opendir (dirname);
if (dirp == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("scandir_emulation cannot open directory %s"),
- dirname),
- -1);
-
+ return -1;
// A sanity check here. "namelist" had better not be zero.
- if (namelist == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("scandir_emulation namelist == 0!")),
- -1);
+ else if (namelist == 0)
+ return -1;
dirent **vector = 0;
dirent *dp;