* path.cc (symlink_info::check): Set executable bit for a file if the first two

characters are 'MZ' to mirror spawn_guts check.
This commit is contained in:
Christopher Faylor
2000-09-30 01:56:40 +00:00
parent 84ecbb38d6
commit 90fe77395a
4 changed files with 58 additions and 97 deletions

View File

@@ -423,7 +423,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
char buf[2 * MAX_PATH + 1];
buf[0] = buf[1] = buf[2] = buf[sizeof(buf) - 1] = '\0';
if (! ReadFile (hnd, buf, sizeof (buf) - 1, &done, 0))
if (!ReadFile (hnd, buf, sizeof (buf) - 1, &done, 0))
{
CloseHandle (hnd);
__seterrno ();
@@ -456,8 +456,8 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
{
/* Null terminate the initial command and step over
any additional white space. If we've hit the
end of the line, exit the loop. Otherwise, position
we've found the first argument. Position the current
end of the line, exit the loop. Otherwise, we've
found the first argument. Position the current
pointer on the last known white space. */
*ptr = '\0';
char *newptr = ptr + 1;