Changeset 21675 for trunk/src


Ignore:
Timestamp:
Jul 29, 2011, 2:30:58 PM (14 years ago)
Author:
dmik
Message:

Fixed a regression in r21674.

This broke the Select Directory dialog in SmartSVN/SmartGit
since GetFileAttributesEx(x:\) would returne a failure again.

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

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

    r21674 r21675  
    810810  // GetFileAttributesEx() does on Win32 -- instead of returning an error as
    811811  // DosQueryPathInfo() does
    812   if (pszOemName[1] == ':' && pszOemName[2] == '\0')
     812  int len = strlen(pszOemName);
     813  if (len == 2 && pszOemName[1] == ':')
    813814  {
    814815      pszOemName[2] = '\\';
    815816      pszOemName[3] = '\0';
    816817  }
    817   else
    818   {
    819       int len = strlen(pszOemName);
    820       // note: the below leaves '\' (i.e. the root dir) as is
    821       while (len > 1 && (pszOemName[len-1] == '\\' || pszOemName[len-1] == '/'))
    822           pszOemName[--len] = '\0';
     818  else if (len > 1 && (len != 3 || pszOemName[1] != ':'))
     819  {
     820      // note: len > 1 above leaves '\' (i.e. the root dir) as is
     821      // and the second condition prevents 'x:\' from being cut
     822      while (pszOemName[len-1] == '\\' || pszOemName[len-1] == '/')
     823          --len;
     824      pszOemName[len] = '\0';
    823825  }
    824826
  • trunk/src/kernel32/virtual.cpp

    r21587 r21675  
    392392    }
    393393
     394    // The below doesn't seem to be true any longer, at least when it comes to
     395    // Odin and Java. Need to do more testing to make sure
     396#if 1
    394397    if(fdwAllocationType & MEM_RESERVE) {
    395398        //SvL: DosRead crashes if memory is initially reserved with write
     
    401404        flag |= PAG_READ|PAG_WRITE;
    402405    }
     406#endif
    403407
    404408    //just do this if other options are used
Note: See TracChangeset for help on using the changeset viewer.