mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
396f32c98e
commit
d019ce0ad1
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Feb 17 14:36:56 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens.
|
||||
|
||||
Mon Feb 17 14:13:25 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (link): implement with CreateHardLink().
|
||||
|
|
|
@ -1243,13 +1243,13 @@ rb_w32_opendir(const char *filename)
|
|||
// check to see if we've got a directory
|
||||
//
|
||||
|
||||
if ((rb_w32_stat (filename, &sbuf) < 0 ||
|
||||
if ((rb_w32_stat(filename, &sbuf) < 0 || (
|
||||
#ifdef __BORLANDC__
|
||||
(unsigned short)(sbuf.st_mode)
|
||||
#else
|
||||
sbuf.st_mode
|
||||
#endif
|
||||
& _S_IFDIR == 0) &&
|
||||
& _S_IFDIR) == 0) &&
|
||||
(!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||
|
||||
((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
|
||||
return NULL;
|
||||
|
@ -3151,7 +3151,7 @@ rb_w32_utime(const char *path, struct utimbuf *times)
|
|||
if (rb_w32_stat(path, &stat)) {
|
||||
return -1;
|
||||
}
|
||||
if (stat.st_mode & S_IFDIR == 0 || IsWin95()) {
|
||||
if ((stat.st_mode & S_IFDIR) == 0 || IsWin95()) {
|
||||
return utime(path, times);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue