Add a note to clarify os.walk() behavior with respect
authorZac Medico <zmedico@gentoo.org>
Sun, 14 Oct 2007 18:29:30 +0000 (18:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 14 Oct 2007 18:29:30 +0000 (18:29 -0000)
to symlinks to directories.

svn path=/main/trunk/; revision=8124

pym/portage/dbapi/vartree.py

index e2797b2faa4a0896979ed32573e4bbc1f8121c7d..67e10b4e3cd91d475198bc3c4ab8f18f63221906 100644 (file)
@@ -1731,6 +1731,9 @@ class dblink(object):
                                if stat.S_ISREG(file_mode):
                                        myfilelist.append(file_path[len(srcroot):])
                                elif stat.S_ISLNK(file_mode):
+                                       # Note: os.walk puts symlinks to directories in the "dirs"
+                                       # list and it does not traverse them since that could lead
+                                       # to an infinite recursion loop.
                                        mylinklist.append(file_path[len(srcroot):])
 
                # Preserve old libs if they are still in use