]> arthur.barton.de Git - bup.git/commitdiff
Don't call _mksubs() in VFS Node nlink()
authorRob Browning <rlb@defaultvalue.org>
Fri, 23 May 2014 22:02:11 +0000 (17:02 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 23 May 2014 22:14:48 +0000 (17:14 -0500)
The VFS Node nlink() code calls _mksubs(), but then just returns 1.
It looks like that may be unnecessary work, so stop doing it.

Thanks to William Stein <wstein@gmail.com> for pointing it out.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/vfs.py

index 9e2d560629f1292995518061b1b525e35bc0e2b1..d76f26f2f98322a09a68314fa90251be13200a3e 100644 (file)
@@ -281,8 +281,6 @@ class Node(object):
 
     def nlinks(self):
         """Get the number of hard links to the current node."""
-        if self._subs == None:
-            self._mksubs()
         return 1
 
     def size(self):