* path.cc (cwdstuff::set): Avoid double aquiring of cwd_lock.
Open directory with inheriting enabled.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user