Changeset 3524 for trunk/src


Ignore:
Timestamp:
May 12, 2000, 8:07:43 PM (25 years ago)
Author:
sandervl
Message:

GetOpenFileNameA/W bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comdlg32/filedlg95.c

    r3511 r3524  
    1 /* $Id: filedlg95.c,v 1.9 2000-05-10 13:12:46 sandervl Exp $*/
     1/* $Id: filedlg95.c,v 1.10 2000-05-12 18:07:43 sandervl Exp $*/
    22/*
    33 * COMMDLG - File Open Dialogs Win95 look and feel
     
    289289  /* Replace the NULL lpstrInitialDir by the current folder */
    290290  lpstrInitialDir = ofn->lpstrInitialDir;
    291   if(!lpstrInitialDir)
     291  if(!lpstrInitialDir || *lpstrInitialDir == 0)
    292292  {
    293293    fodInfos->ofnInfos->lpstrInitialDir = MemAlloc(MAX_PATH);
     
    429429  // convert initial dir & title (if necessary)
    430430  lpstrInitialDir = (LPWSTR)ofn->lpstrInitialDir;
    431   if(lpstrInitialDir) {
     431  if(lpstrInitialDir && *lpstrInitialDir != 0) {
    432432        ofn->lpstrInitialDir = MemAlloc(lstrlenW(ofn->lpstrInitialDir)+1);
    433433        lstrcpyWtoA((LPSTR)ofn->lpstrInitialDir, lpstrInitialDir);
    434434  }
     435  else
     436  /* Replace the NULL lpstrInitialDir by the current folder */
     437  if(!lpstrInitialDir || *lpstrInitialDir == 0)
     438  {
     439        ofn->lpstrInitialDir = MemAlloc(MAX_PATH);
     440        GetCurrentDirectoryA(MAX_PATH,(LPSTR)ofn->lpstrInitialDir);
     441  }
     442
    435443  lpstrTitle = (LPWSTR)ofn->lpstrTitle;
    436444  if(lpstrTitle) {
Note: See TracChangeset for help on using the changeset viewer.