]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: "Michael O'Reilly" <michael@metal.iinet.net.au>
authorwessels <>
Wed, 18 Feb 1998 02:08:34 +0000 (02:08 +0000)
committerwessels <>
Wed, 18 Feb 1998 02:08:34 +0000 (02:08 +0000)
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.

src/store_rebuild.cc

index 3e1bf389759115b637c14f0541e67f98cabe8803..256c2a67a842a48dbb143183084c4462cf53c936 100644 (file)
@@ -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);
        }