* path.cc (cwdstuff::set): Don't try to open directory on systems not
supporting that.
This commit is contained in:
parent
a83c59fbc3
commit
2156546df2
@ -1,3 +1,8 @@
|
|||||||
|
2006-12-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.cc (cwdstuff::set): Don't try to open directory on systems not
|
||||||
|
supporting that.
|
||||||
|
|
||||||
2006-12-05 Corinna Vinschen <corinna@vinschen.de>
|
2006-12-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* dcrt0.cc (get_cygwin_startup_info): Fix comment.
|
* dcrt0.cc (get_cygwin_startup_info): Fix comment.
|
||||||
|
@ -4214,15 +4214,18 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit)
|
|||||||
set_errno (ENOTDIR);
|
set_errno (ENOTDIR);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
HANDLE h = CreateFile (win32_cwd, GENERIC_READ, wincap.shared (),
|
if (wincap.can_open_directories ())
|
||||||
NULL, OPEN_EXISTING,
|
|
||||||
FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
|
||||||
if (h == INVALID_HANDLE_VALUE)
|
|
||||||
{
|
{
|
||||||
__seterrno ();
|
HANDLE h = CreateFile (win32_cwd, GENERIC_READ, wincap.shared (),
|
||||||
goto out;
|
NULL, OPEN_EXISTING,
|
||||||
|
FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||||
|
if (h == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
__seterrno ();
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
CloseHandle (h);
|
||||||
}
|
}
|
||||||
CloseHandle (h);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* If there is no win32 path or it has the form c:xxx, get the value */
|
/* If there is no win32 path or it has the form c:xxx, get the value */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user