svn path=/main/trunk/; revision=2881
(gid != -1 and gid != stat_cached.st_gid):
os.chown(filename, uid, gid)
- st_mode = stat_cached.st_mode & 0777 # protect from unwanted bits
+ st_mode = stat_cached.st_mode & 07777 # protect from unwanted bits
if mask >= 0:
if mode == -1:
mode = 0 # Don't add any mode bits when mode is unspecified.
new_mode = mask ^ new_mode
os.chmod(filename, new_mode)
elif mode != -1:
- mode = mode & 0777 # protect from unwanted bits
+ mode = mode & 07777 # protect from unwanted bits
if mode != st_mode:
os.chmod(filename, mode)
except OSError, oe: