Changeset 13847


Ignore:
Timestamp:
Mar 29, 2000, 5:19:36 PM (25 years ago)
Author:
cbratschi
Message:

wrong path fix

File:
1 edited

Legend:

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

    r13833 r13847  
    1 /* $Id: filedlg95.c,v 1.6 2000-03-28 15:26:42 cbratschi Exp $*/
     1/* $Id: filedlg95.c,v 1.7 2000-03-29 15:19:36 cbratschi Exp $*/
    22/*
    33 * COMMDLG - File Open Dialogs Win95 look and feel
     
    13931393        HANDLE hFile;
    13941394        WIN32_FIND_DATAA stffile;
    1395 //CB: FindFirstFileA bug!
     1395
    13961396        /* browse if the user specified a directory */
    1397         hFile = FindFirstFileA(lpstrFileSpec, &stffile);
     1397        hFile = FindFirstFileA(lpstrPathAndFile,&stffile);
    13981398        if ( hFile != INVALID_HANDLE_VALUE )
    13991399        {
     
    14061406            // if there is an extention, then get the Pidl otherwise
    14071407            // we are going to need to add the extention
    1408            if(strrchr(lpstrFileSpec,'.'))
    1409              browsePidl = GetPidlFromName(fodInfos->Shell.FOIShellFolder,
     1408            if(strrchr(lpstrFileSpec,'.'))
     1409              browsePidl = GetPidlFromName(fodInfos->Shell.FOIShellFolder,
    14101410                                          lpstrFileSpec);
    1411            else
    1412              browsePidl=NULL;
     1411            else
     1412              browsePidl=NULL;
    14131413          }
    14141414        }
     
    16431643                        LPSTR lpstrFindFile;
    16441644                        WIN32_FIND_DATAA fd;
     1645                        HANDLE hFind;
    16451646
    16461647                        lpstrFindFile = MemAlloc(strlen(lpstrPathAndFile)+strlen(lpstrExt));
    16471648                        strcpy(lpstrFindFile, lpstrPathAndFile);
    16481649                        strcat(lpstrFindFile, lpstrExt);
    1649                         if(FindFirstFileA(lpstrFindFile, &fd) != INVALID_HANDLE_VALUE)
    1650                                 strcat(lpstrPathAndFile,lpstrExt);
     1650                        hFind = FindFirstFileA(lpstrFindFile,&fd);
     1651                        if(hFind != INVALID_HANDLE_VALUE)
     1652                        {
     1653                          strcat(lpstrPathAndFile,lpstrExt);
     1654                          FindClose(hFind);
     1655                        }
    16511656                        MemFree(lpstrFindFile);
    16521657                  }
     
    18131818  /* Find a Unique directory name */
    18141819  hHandle = FindFirstFileA(lpstrNewDir,&FindData);
    1815   if(hHandle !=INVALID_HANDLE_VALUE)
     1820  if(hHandle != INVALID_HANDLE_VALUE)
    18161821  {
    18171822    int i;
     
    18591864      MessageBoxA(hwnd,lpstrText, lpstrCaption, MB_OK | MB_ICONEXCLAMATION);
    18601865    }
    1861   }
     1866  } else FindClose(hHandle);
    18621867  return bRes;
    18631868}
Note: See TracChangeset for help on using the changeset viewer.