summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-11 13:29:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-11 13:29:46 (GMT)
commitd1f655a66195a041d20c33012ab0bfc89f13a1a4 (patch)
tree08c1382b370bca40dc144a4669cfa2315a71b7ae /win/tclWinFile.c
parent60a0f32055ec6d3f76e3261646cfe1b63c688a4a (diff)
parent4a83f77ba9ac5d498e841d925a930391543879b9 (diff)
downloadtcl-d1f655a66195a041d20c33012ab0bfc89f13a1a4.zip
tcl-d1f655a66195a041d20c33012ab0bfc89f13a1a4.tar.gz
tcl-d1f655a66195a041d20c33012ab0bfc89f13a1a4.tar.bz2
[Bug 2935503] Incorrect mode field returned by file stat command
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 0291a41..9c95e7a 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1281,7 +1281,7 @@ WinIsReserved(
* because for NTFS root volumes, the getFileAttributesProc returns a
* 'hidden' attribute when it should not.
*
- * We never make any calss to a 'get attributes' routine here, since we
+ * We never make any calls to a 'get attributes' routine here, since we
* have arranged things so that our caller already knows such
* information.
*
@@ -2265,8 +2265,8 @@ NativeStatMode(
* positions.
*/
- mode |= (mode & 0x0700) >> 3;
- mode |= (mode & 0x0700) >> 6;
+ mode |= (mode & (S_IREAD|S_IWRITE|S_IEXEC)) >> 3;
+ mode |= (mode & (S_IREAD|S_IWRITE|S_IEXEC)) >> 6;
return (unsigned short) mode;
}