[WIP RFC PATCH 2/7] dir-iterator: use stat() instead of lstat()
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 26, 2019, 00:26 UTC
- Message-ID
- <20190226002625.13022-3-avarab@gmail.com>
- In-Reply-To
- <CACsJy8Bw-mXLyT7VaKBjYKLe6uSAQqyLG=_AzjDXykYzSQLkcg@mail.gmail.com>
This is surely a horrible idea, but all tests pass with this (not that I trust them much). Doing this for later WIP use in clone.c.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- dir-iterator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dir-iterator.c b/dir-iterator.c index 070a656555..6a9c0c4d08 100644 --- a/dir-iterator.c +++ b/dir-iterator.c @@ -149,7 +149,7 @@ int dir_iterator_advance(struct dir_iterator *dir_iterator) continue; strbuf_addstr(&iter->base.path, de->d_name); - if (lstat(iter->base.path.buf, &iter->base.st) < 0) { + if (stat(iter->base.path.buf, &iter->base.st) < 0) { if (errno != ENOENT) { if (iter->pedantic) goto error_out;
-- 2.21.0.rc2.1.g2d5e20a900.dirty