fix dir_stat_get, was missing the first file

This commit is contained in:
Doug MacEachern 2004-06-30 00:37:46 +00:00
parent 018f634896
commit 771742caf9
1 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ SIGAR_DECLARE(int) sigar_dir_stat_get(sigar_t *sigar,
return GetLastError(); return GetLastError();
} }
while (FindNextFile(handle, &data)) { do {
/* skip '.' and '..' */ /* skip '.' and '..' */
if (IS_DOTDIR(data.cFileName)) { if (IS_DOTDIR(data.cFileName)) {
continue; continue;
@ -303,7 +303,7 @@ SIGAR_DECLARE(int) sigar_dir_stat_get(sigar_t *sigar,
default: default:
++dirstats->total; ++dirstats->total;
} }
} } while (FindNextFile(handle, &data));
error = GetLastError(); error = GetLastError();