Changeset 1639 for trunk


Ignore:
Timestamp:
Oct 10, 2011, 12:01:20 AM (14 years ago)
Author:
Gregg Young
Message:

Fix list file creation failure when file doesn't exist. Ticket 477

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/wrappers.c

    r1628 r1639  
    2121  26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
    2222                xDosAlloc* wrappers.
     23  09 Oct 11 GKY Modify xfsopen so it doesn't fail when called with r+ because the file doesn't exist.
     24                We should be creating the file unless it is set to fail silently.
    2325
    2426***********************************************************************/
     
    453455  strcpy(FileName, pszFileName);
    454456  fp = _fsopen(FileName, pszMode, fSharemode);
     457  if (!fp && !strcmp(pszMode,  "r+") && !fSilent)
     458    fp = _fsopen(FileName, "w+", fSharemode);
    455459
    456460  if (!fp && !fSilent)
Note: See TracChangeset for help on using the changeset viewer.