db/update/Walk: disable FindAncestorLoop() if device/inode==0

This commit is contained in:
Max Kellermann 2014-02-09 10:46:57 +01:00
parent e29a8b3a9c
commit 2182209a8a

View File

@ -163,6 +163,11 @@ FindAncestorLoop(Storage &storage, Directory *parent,
unsigned inode, unsigned device)
{
#ifndef WIN32
if (device == 0 && inode == 0)
/* can't detect loops if the Storage does not support
these numbers */
return 0;
while (parent) {
if (!parent->have_stat &&
!update_directory_stat(storage, *parent))