mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* path.cc (fs_info::update): Correctly handle the volume root directory.
This commit is contained in:
parent
4a971ce403
commit
cb8e4b58f5
@ -1,3 +1,7 @@
|
||||
2007-08-14 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (fs_info::update): Correctly handle the volume root directory.
|
||||
|
||||
2007-08-14 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (fhandler_base::pc): Make public.
|
||||
|
@ -393,17 +393,20 @@ fs_info::update (PUNICODE_STRING upath, bool exists)
|
||||
if (exists)
|
||||
status = NtOpenFile (&vol, READ_CONTROL, &attr, &io, FILE_SHARE_VALID_FLAGS,
|
||||
FILE_OPEN_FOR_BACKUP_INTENT);
|
||||
while (!NT_SUCCESS (status) && attr.ObjectName->Length > 6 * sizeof (WCHAR))
|
||||
while (!NT_SUCCESS (status)
|
||||
&& (attr.ObjectName->Length > 7 * sizeof (WCHAR)
|
||||
|| status == STATUS_NO_MEDIA_IN_DEVICE))
|
||||
{
|
||||
UNICODE_STRING dir;
|
||||
RtlSplitUnicodePath (attr.ObjectName, &dir, NULL);
|
||||
dir.Length -= sizeof (WCHAR);
|
||||
attr.ObjectName = &dir;
|
||||
if (status == STATUS_NO_MEDIA_IN_DEVICE)
|
||||
{
|
||||
no_media = true;
|
||||
dir.Length = 6 * sizeof (WCHAR);
|
||||
}
|
||||
else if (dir.Length > 7 * sizeof (WCHAR))
|
||||
dir.Length -= sizeof (WCHAR);
|
||||
status = NtOpenFile (&vol, READ_CONTROL, &attr, &io,
|
||||
FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user