Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 2448:b77a2ef61b81
replace os.stat with os.lstat in some where.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 16 Jun 2006 12:58:24 -0700 |
parents | e9b5749e4de3 |
children | d610bcfd66a8 fe1689273f84 |
line wrap: on
line diff
--- a/mercurial/util.py Fri Jun 16 10:19:45 2006 -0700 +++ b/mercurial/util.py Fri Jun 16 12:58:24 2006 -0700 @@ -474,7 +474,7 @@ def nlinks(pathname): """Return number of hardlinks for the given file.""" - return os.stat(pathname).st_nlink + return os.lstat(pathname).st_nlink if hasattr(os, 'link'): os_link = os.link @@ -625,10 +625,10 @@ def is_exec(f, last): """check whether a file is executable""" - return (os.stat(f).st_mode & 0100 != 0) + return (os.lstat(f).st_mode & 0100 != 0) def set_exec(f, mode): - s = os.stat(f).st_mode + s = os.lstat(f).st_mode if (s & 0100 != 0) == mode: return if mode: