Ignore:
Timestamp:
Jun 12, 2000, 4:59:38 PM (25 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

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

    r3693 r3694  
    1 /* $Id: directory.cpp,v 1.24 2000-06-12 13:03:00 phaller Exp $ */
     1/* $Id: directory.cpp,v 1.25 2000-06-12 14:59:37 phaller Exp $ */
    22
    33/*
     
    4343
    4444ODINDEBUGCHANNEL(KERNEL32-DIRECTORY)
     45
     46
     47/*****************************************************************************
     48 * Local Prototypes                                                          *
     49 *****************************************************************************/
    4550
    4651
     
    224229 
    225230  // cut off trailing backslashes
    226   if (lpstrDirectory[len - 1] == '\\')
     231  if ( (lpstrDirectory[len - 1] == '\\') ||
     232       (lpstrDirectory[len - 1] == '/') )
    227233  {
    228234    lstrcpynA(szBuffer,
     
    236242            lpstrDirectory));
    237243 
    238   return(O32_CreateDirectory(szBuffer,
     244  // PH Note 2000/06/12:
     245  // Creation of an existing directory is NO ERROR it seems.
     246  DWORD dwAttr = GetFileAttributesA(lpstrDirectory);
     247  if (dwAttr != -1)
     248    if (dwAttr & FILE_ATTRIBUTE_DIRECTORY)
     249    {
     250      SetLastError(ERROR_SUCCESS);
     251      return TRUE;
     252    }
     253 
     254  return(O32_CreateDirectory(lpstrDirectory,
    239255                             arg2));
    240256}
     
    407423 
    408424  // cut off trailing backslashes
    409   if (lpstrDirectory[len - 1] == '\\')
     425  if ( (lpstrDirectory[len - 1] == '\\') ||
     426       (lpstrDirectory[len - 1] == '/') )
    410427  {
    411428    lstrcpynA(szBuffer,
Note: See TracChangeset for help on using the changeset viewer.