summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2011-10-11 13:39:08 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2011-10-11 13:39:08 (GMT)
commit175b52b2bcaa8fa1c4632d6028d05c2beed6862f (patch)
tree4f4555d10a6a15438f52ad130f90c50ceca12fb4 /win/tclWinFile.c
parent4591beab452694ad6812d541838bd6c19cb4d9fc (diff)
parentbee62c2308565555863f67e1afee70a6edc6fab0 (diff)
downloadtcl-175b52b2bcaa8fa1c4632d6028d05c2beed6862f.zip
tcl-175b52b2bcaa8fa1c4632d6028d05c2beed6862f.tar.gz
tcl-175b52b2bcaa8fa1c4632d6028d05c2beed6862f.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 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;
}