In movefile(), ignore the hardlink_candidates parameter when it's an empty list.
authorZac Medico <zmedico@gentoo.org>
Wed, 26 Nov 2008 23:07:44 +0000 (23:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 26 Nov 2008 23:07:44 +0000 (23:07 -0000)
(trunk r12111)

svn path=/main/branches/2.1.6/; revision=12112

pym/portage/__init__.py

index 2fcb4b143a6cfbf9f293cb4b1c4c567ace8efb7b..2db358580591dcdf6da0bbcb1b315a8fdbc8fd7d 100644 (file)
@@ -6036,7 +6036,7 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
        # so os.link() calls might fail for some paths, so try them all.
        # For atomic replacement, first create the link as a temp file
        # and them use os.rename() to replace the destination.
-       if hardlink_candidates is not None:
+       if hardlink_candidates:
                head, tail = os.path.split(dest)
                hardlink_tmp = os.path.join(head, ".%s._portage_merge_.%s" % \
                        (tail, os.getpid()))