windows: correctly pass a mode to S_IFMT in statfiles
authorMatt Mackall <mpm@selenic.com>
Thu, 06 Dec 2012 16:56:44 -0600
changeset 18041 f0cfa27c712a
parent 18040 fe8caf28d580
child 18042 551e2901192e
windows: correctly pass a mode to S_IFMT in statfiles
mercurial/windows.py
--- a/mercurial/windows.py	Wed Dec 05 14:33:15 2012 -0800
+++ b/mercurial/windows.py	Thu Dec 06 16:56:44 2012 -0600
@@ -232,7 +232,7 @@
             try:
                 dmap = dict([(normcase(n), s)
                              for n, k, s in osutil.listdir(dir, True)
-                             if getkind(s) in _wantedkinds])
+                             if getkind(s.st_mode) in _wantedkinds])
             except OSError, err:
                 # handle directory not found in Python version prior to 2.5
                 # Python <= 2.4 returns native Windows code 3 in errno