Ignore:
Timestamp:
Aug 22, 2002, 4:21:27 PM (23 years ago)
Author:
sandervl
Message:

Rewrote GetFileAttributesA & translate filename used from Windows to OS/2 codepage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/Fileio.cpp

    r9011 r9095  
    1 /* $Id: Fileio.cpp,v 1.67 2002-08-16 09:56:30 sandervl Exp $ */
     1/* $Id: Fileio.cpp,v 1.68 2002-08-22 14:21:26 sandervl Exp $ */
    22
    33/*
     
    293293        else 
    294294            filename = (char *)lpFileName;
    295       
     295 
    296296        return (HANDLE)OSLibDosFindFirst(filename, (WIN32_FIND_DATAA *)lpFindFileData);
    297297
     
    390390                                    DWORD * count)
    391391{
     392    dprintf(("FindFirstFileMultiA %s %x %x", lpFileName, lpFindFileData, count));
    392393    return (HANDLE)OSLibDosFindFirstMulti(lpFileName,lpFindFileData,count);
    393394}
     
    404405              DWORD *count)
    405406{
    406   return OSLibDosFindNextMulti(hFindFile,lpFindFileData,count);
     407    dprintf(("FindNextFileMultiA %x %x %x", hFindFile, lpFindFileData, count));
     408    return OSLibDosFindNextMulti(hFindFile,lpFindFileData,count);
    407409}
    408410//******************************************************************************
     
    810812    DWORD rc, error;
    811813
    812     if((NULL!=lpszFileName) && strlen(lpszFileName)==2 && lpszFileName[1] == ':')
    813     {
    814         char szDrive[4];
    815         szDrive[0] = lpszFileName[0];
    816         szDrive[1] = lpszFileName[1];
    817         szDrive[2] = '\\';
    818         szDrive[3] = 0x00;
    819         rc = O32_GetFileAttributes((LPSTR)szDrive);
    820     }
    821     else {
    822         rc = O32_GetFileAttributes((LPSTR)lpszFileName);
    823         if(rc == -1 && lpszFileName[strlen(lpszFileName)-1] != '\\') {
    824             char *filename = (char *)alloca(strlen(lpszFileName)+2); //+2!!!!!!
    825             strcpy(filename, lpszFileName);
    826             strcat(filename, "\\");
    827             rc = O32_GetFileAttributes((LPSTR)filename);
    828         }
    829     }
     814    rc = OSLibGetFileAttributes((LPSTR)lpszFileName);
     815
    830816    //SvL: Open32 returns FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_NORMAL for
    831817    //     directories whereas NT 4 (SP6) only returns FILE_ATTRIBUTE_DIRECTORY
Note: See TracChangeset for help on using the changeset viewer.