* path.cc (cwdstuff::set): Avoid double aquiring of cwd_lock.

Open directory with inheriting enabled.
This commit is contained in:
Corinna Vinschen
2007-05-22 12:43:31 +00:00
parent ba75e8c878
commit 542a6016e5
2 changed files with 8 additions and 2 deletions

View File

@ -4224,7 +4224,8 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit)
if (win32_cwd)
{
cwd_lock.acquire ();
if (!cwd_lock.acquired ())
cwd_lock.acquire ();
if (doit)
{
/* We utilize the user parameter block. The directory is
@ -4252,7 +4253,7 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit)
goto out;
}
h = CreateFile (win32_cwd, FILE_TRAVERSE, FILE_SHARE_VALID_FLAGS,
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS,
&sec_none, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS,
NULL);
if (h == INVALID_HANDLE_VALUE)
{