atomictempfile: avoid chmod weirdness on Linux vfat
authorMatt Mackall <mpm@selenic.com>
Thu, 27 Dec 2007 23:55:40 -0600
changeset 5740 9046a4f6a07c
parent 5739 45fa7b1c5d4c
child 5741 8ee0de123989
atomictempfile: avoid chmod weirdness on Linux vfat
mercurial/util.py
--- a/mercurial/util.py	Thu Dec 27 23:55:40 2007 -0600
+++ b/mercurial/util.py	Thu Dec 27 23:55:40 2007 -0600
@@ -1313,7 +1313,7 @@
     # what we want.  If the original file already exists, just copy
     # its mode.  Otherwise, manually obey umask.
     try:
-        st_mode = os.lstat(name).st_mode
+        st_mode = os.lstat(name).st_mode & 0777
     except OSError, inst:
         if inst.errno != errno.ENOENT:
             raise