From: wessels <> Date: Wed, 18 Feb 1998 02:08:34 +0000 (+0000) Subject: From: "Michael O'Reilly" X-Git-Tag: SQUID_3_0_PRE1~4080 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c9a3fc52bac183ccf523cb2eab455530a17a092;p=thirdparty%2Fsquid.git From: "Michael O'Reilly" Required, becuase the contents of errno are undefined unless the previous library call returned an error. Errno is NOT cleared on a successful library call. --- diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 3e1bf38975..256c2a67a8 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -448,7 +448,7 @@ storeGetNextFile(rebuild_dir * d, int *sfileno, int *size) } d->entry = readdir(d->td); /* skip . and .. */ d->entry = readdir(d->td); - if (errno == ENOENT) + if (d->entry == NULL && errno == ENOENT) debug(20, 1) ("storeGetNextFile: directory does not exist!.\n"); debug(20, 3) ("storeGetNextFile: Directory %s\n", d->fullpath); }