aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-09 10:46:57 +0100
committerMax Kellermann <max@duempel.org>2014-02-09 10:47:29 +0100
commit2182209a8ac1ed2f0c80893ecac4d81fcab18e18 (patch)
tree71cfc8c1f2b98b2bc00f9f5dd5b6d3a5cd65b9f2 /src/db/update
parente29a8b3a9c685239ec2ccc89518aff3acd128a8c (diff)
downloadmpd-2182209a8ac1ed2f0c80893ecac4d81fcab18e18.tar.gz
mpd-2182209a8ac1ed2f0c80893ecac4d81fcab18e18.tar.xz
mpd-2182209a8ac1ed2f0c80893ecac4d81fcab18e18.zip
db/update/Walk: disable FindAncestorLoop() if device/inode==0
Diffstat (limited to 'src/db/update')
-rw-r--r--src/db/update/Walk.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx
index 44b10e2bd..2cb360bf6 100644
--- a/src/db/update/Walk.cxx
+++ b/src/db/update/Walk.cxx
@@ -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))