Commit 052208fc authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3845 get recover-loader-test working on amazon with broken readdir refs[t:3845]

git-svn-id: file:///svn/toku/tokudb@33718 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1ba57f98
...@@ -79,10 +79,10 @@ count_temp(char * dirname) { ...@@ -79,10 +79,10 @@ count_temp(char * dirname) {
int n = 0; int n = 0;
DIR * dir = opendir(dirname); DIR * dir = opendir(dirname);
struct dirent *ent; struct dirent *ent;
while ((ent=readdir(dir))) while ((ent = readdir(dir)))
if ((ent->d_type == DT_UNKNOWN || ent->d_type == DT_REG) && strncmp(ent->d_name, loader_temp_prefix, 6) == 0) if ((ent->d_type == DT_REG || ent->d_type == DT_UNKNOWN) && strncmp(ent->d_name, loader_temp_prefix, 6) == 0)
n++; n++;
closedir(dir); closedir(dir);
return n; return n;
...@@ -96,8 +96,8 @@ print_dir(char * dirname) { ...@@ -96,8 +96,8 @@ print_dir(char * dirname) {
DIR * dir = opendir(dirname); DIR * dir = opendir(dirname);
struct dirent *ent; struct dirent *ent;
while ((ent=readdir(dir))) { while ((ent = readdir(dir))) {
if (ent->d_type==DT_REG) { if (ent->d_type == DT_REG || ent->d_type == DT_UNKNOWN) {
n++; n++;
printf("File: %s\n", ent->d_name); printf("File: %s\n", ent->d_name);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment