mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Loops without an increment step can suck, even on windows.
svn:r5376
This commit is contained in:
parent
9b432311c4
commit
6c361468c1
@ -1243,10 +1243,10 @@ tor_listdir(const char *dirname)
|
||||
}
|
||||
result = smartlist_create();
|
||||
while (1) {
|
||||
if (!strcmp(findData.cFileName, ".") ||
|
||||
!strcmp(findData.cFileName, ".."))
|
||||
continue;
|
||||
smartlist_add(result, tor_strdup(findData.cFileName));
|
||||
if (strcmp(findData.cFileName, ".") &&
|
||||
strcmp(findData.cFileName, "..")) {
|
||||
smartlist_add(result, tor_strdup(findData.cFileName));
|
||||
}
|
||||
if (!FindNextFile(handle, &findData)) {
|
||||
if (GetLastError() != ERROR_NO_MORE_FILES) {
|
||||
warn(LD_FS, "Error reading directory.");
|
||||
|
Loading…
Reference in New Issue
Block a user