From: Gurusamy Sarathy Date: Tue, 15 Feb 2000 16:07:17 +0000 (+0000) Subject: propagate st_mode bits to group/other for Borland build X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0650a05fe2c0c137c168267e07071f674fa64bd;p=p5sagit%2Fp5-mst-13.2.git propagate st_mode bits to group/other for Borland build (from Vadim Konovalov ) p4raw-id: //depot/perl@5097 --- diff --git a/win32/win32.c b/win32/win32.c index 71097ea..b172759 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1132,6 +1132,7 @@ win32_stat(const char *path, struct stat *sbuf) if (S_ISDIR(sbuf->st_mode)) sbuf->st_mode |= S_IWRITE | S_IEXEC; else if (S_ISREG(sbuf->st_mode)) { + int perms; if (l >= 4 && path[l-4] == '.') { const char *e = path + l - 3; if (strnicmp(e,"exe",3) @@ -1144,6 +1145,9 @@ win32_stat(const char *path, struct stat *sbuf) } else sbuf->st_mode &= ~S_IEXEC; + /* Propagate permissions to _group_ and _others_ */ + perms = sbuf->st_mode & (S_IREAD|S_IWRITE|S_IEXEC); + sbuf->st_mode |= (perms>>3) | (perms>>6); } #endif }