* path.cc (symlink_info::check): Set h to NULL after closing handle
in udf check. Remove overagressive bracketing. Don't set h to NULL without closing the handle. Fix using wrong handle in checking file system when using parent directory handle.
This commit is contained in:
parent
68ff495c60
commit
b7d3e6d7d2
@ -1,3 +1,10 @@
|
|||||||
|
2010-06-08 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.cc (symlink_info::check): Set h to NULL after closing handle
|
||||||
|
in udf check. Remove overagressive bracketing. Don't set h to NULL
|
||||||
|
without closing the handle. Fix using wrong handle in checking
|
||||||
|
file system when using parent directory handle.
|
||||||
|
|
||||||
2010-06-07 Corinna Vinschen <corinna@vinschen.de>
|
2010-06-07 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* include/sys/stdio.h: Remove _GNU_SOURCE guard around getline
|
* include/sys/stdio.h: Remove _GNU_SOURCE guard around getline
|
||||||
|
@ -2308,6 +2308,7 @@ restart:
|
|||||||
if (!fs.is_udf ())
|
if (!fs.is_udf ())
|
||||||
{
|
{
|
||||||
NtClose (h);
|
NtClose (h);
|
||||||
|
h = NULL;
|
||||||
status = STATUS_OBJECT_NAME_NOT_FOUND;
|
status = STATUS_OBJECT_NAME_NOT_FOUND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2355,7 +2356,7 @@ restart:
|
|||||||
if (NT_SUCCESS (status)
|
if (NT_SUCCESS (status)
|
||||||
/* Check file system while we're having the file open anyway.
|
/* Check file system while we're having the file open anyway.
|
||||||
This speeds up path_conv noticably (~10%). */
|
This speeds up path_conv noticably (~10%). */
|
||||||
&& (fs.inited () || (fs.update (&upath, h)))
|
&& (fs.inited () || fs.update (&upath, h))
|
||||||
&& NT_SUCCESS (status = fs.has_buggy_basic_info ()
|
&& NT_SUCCESS (status = fs.has_buggy_basic_info ()
|
||||||
? NtQueryAttributesFile (&attr, &fbi)
|
? NtQueryAttributesFile (&attr, &fbi)
|
||||||
: NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
|
: NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
|
||||||
@ -2364,7 +2365,6 @@ restart:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
debug_printf ("%p = NtQueryInformationFile (%S)", status, &upath);
|
debug_printf ("%p = NtQueryInformationFile (%S)", status, &upath);
|
||||||
h = NULL;
|
|
||||||
fileattr = INVALID_FILE_ATTRIBUTES;
|
fileattr = INVALID_FILE_ATTRIBUTES;
|
||||||
|
|
||||||
/* One of the inner path components is invalid, or the path contains
|
/* One of the inner path components is invalid, or the path contains
|
||||||
@ -2427,7 +2427,7 @@ restart:
|
|||||||
TRUE, &basename, TRUE);
|
TRUE, &basename, TRUE);
|
||||||
/* Take the opportunity to check file system while we're
|
/* Take the opportunity to check file system while we're
|
||||||
having the handle to the parent dir. */
|
having the handle to the parent dir. */
|
||||||
fs.update (&upath, h);
|
fs.update (&upath, dir);
|
||||||
NtClose (dir);
|
NtClose (dir);
|
||||||
if (!NT_SUCCESS (status))
|
if (!NT_SUCCESS (status))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user