--- a/mercurial/util.py Sun Jul 20 21:00:13 2008 +0200
+++ b/mercurial/util.py Wed Jul 23 16:08:20 2008 +0200
@@ -1427,7 +1427,7 @@
mode += "b" # for that other OS
nlink = -1
- if mode[0] != "r":
+ if mode not in ("r", "rb"):
try:
nlink = nlinks(f)
except OSError: