summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-11 13:39:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-11 13:39:08 (GMT)
commit8565cd4a3dd278a2ff60fd5e0573d746d209466e (patch)
tree4f4555d10a6a15438f52ad130f90c50ceca12fb4 /win
parent2befc6793de3b9eba7c26d5def4cdfc023a8824b (diff)
parentd1f655a66195a041d20c33012ab0bfc89f13a1a4 (diff)
downloadtcl-8565cd4a3dd278a2ff60fd5e0573d746d209466e.zip
tcl-8565cd4a3dd278a2ff60fd5e0573d746d209466e.tar.gz
tcl-8565cd4a3dd278a2ff60fd5e0573d746d209466e.tar.bz2
[Bug 2935503] Incorrect mode field returned by file stat command
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index f0f3bb0..80bf799 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1288,7 +1288,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.
*
@@ -2178,8 +2178,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;
}