fixed little bug in FindFirstFile()

svn path=/trunk/; revision=408
This commit is contained in:
Eric Kohl 1999-04-23 11:51:00 +00:00
parent 321081bb62
commit 54378dbf2a

View file

@ -112,19 +112,11 @@ HANDLE STDCALL InternalFindFirstFile(LPCWSTR lpFileName,
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING DirectoryNameStr;
IO_STATUS_BLOCK IoStatusBlock;
DWORD Len = 0;
// DWORD Len = 0;
DPRINT("FindFirstFileW(lpFileName %w, lpFindFileData %x)\n",
lpFileName, lpFindFileData);
lpFileName, lpFindFileData);
/*
Len = GetCurrentDirectoryW(MAX_PATH, CurrentDirectory);
if (CurrentDirectory[Len - 1] != L'\\')
{
CurrentDirectory[Len] = L'\\';
CurrentDirectory[Len + 1] = 0;
}
*/
GetFullPathNameW(lpFileName, MAX_PATH, CurrentDirectory, NULL);
Directory[0] = '\\';
Directory[1] = '?';
@ -134,8 +126,6 @@ HANDLE STDCALL InternalFindFirstFile(LPCWSTR lpFileName,
DPRINT("Directory %w\n",Directory);
wcscat(Directory, CurrentDirectory);
DPRINT("Directory %w\n",Directory);
// wcscat(Directory, lpFileName);
// DPRINT("Directory %w\n",Directory);
End = wcsrchr(Directory, '\\');
*End = 0;
@ -143,6 +133,10 @@ HANDLE STDCALL InternalFindFirstFile(LPCWSTR lpFileName,
*(End+1) = 0;
*End = '\\';
/* change pattern: "*.*" --> "*" */
if (!wcscmp(Pattern, L"*.*"))
Pattern[1] = 0;
DPRINT("Directory %w Pattern %w\n",Directory,Pattern);
IData = HeapAlloc(GetProcessHeap(),