Changeset 1838 for trunk/dll/dircnrs.c


Ignore:
Timestamp:
Aug 3, 2015, 12:14:21 AM (10 years ago)
Author:
Gregg Young
Message:

Serialize local hard drive scanning to reduce drive thrashing continue to scan all other drive types in separate threads. Ticket [561] Remove unneed SubbyScan code and improve suppression of blank lines and duplicate subdirectory name caused by running Stubby in worker threads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r1836 r1838  
    9090  02 May 15 GKY Changes to allow a JAVA executable object to be created using "Real object"
    9191                menu item on a jar file.
     92  02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and
     93                duplicate subdirectory name caused by running Stubby in worker threads.
    9294
    9395***********************************************************************/
     
    832834                       MPVOID, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER));
    833835      while (pci && (INT) pci != -1) {
     836        if (!pci->pszFileName || !strcmp(pci->pszFileName, NullStr)) {
     837          Runtime_Error(pszSrcFile, __LINE__, "pci->pszFileName NULL for %p", pci);
     838          return 0;
     839        }
    834840        if (pci->attrFile & FILE_DIRECTORY) {
    835841          pciC = WinSendMsg(dcd->hwndCnr,
     
    837843                            MPFROMP(pci),
    838844                            MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER));
    839           if (!pciC) {
    840             Stubby(dcd->hwndCnr, pci);
    841           }
     845          if (!pciC) {
     846            Stubby(dcd->hwndCnr, pci);
     847          }
    842848        }
    843849        pci = WinSendMsg(dcd->hwndCnr,
     
    895901        if (fSwitchTreeOnDirChg) {
    896902          // Keep drive tree in sync with directory container
    897           PSZ pszTempDir;
    898           while (fInitialDriveScan) {
    899             DosSleep(100);                      // Allow to complete
    900           }
     903          PSZ pszTempDir;
     904          while (fInitialDriveScan)
     905            DosSleep(10);                       // Allow to complete
     906          DosSleep(50);
    901907          pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__);
    902908          if (pszTempDir) {
     
    15631569      WinSendMsg(hwnd,
    15641570                 CM_QUERYCNRINFO,
    1565                 MPFROMP(&cnri), MPFROMLONG(sizeof(CNRINFO)));
     1571                MPFROMP(&cnri), MPFROMLONG(sizeof(CNRINFO)));
    15661572      cnri.pSortRecord = (PVOID) SortDirCnr;
    15671573      WinSendMsg(hwnd,
     
    15901596        cnri.flWindowAttr &= (~(CV_TREE | CV_ICON | CV_DETAIL | CV_TEXT));
    15911597        cnri.flWindowAttr |= (CV_NAME | CA_DETAILSVIEWTITLES | CV_MINI |
    1592                               CV_FLOW);
     1598                              CV_FLOW);
    15931599        cnri.pSortRecord = (PVOID) SortDirCnr;
    15941600
     
    21222128            dcd->sortFlags |= SORT_REVERSE;
    21232129          break;
    2124         }
     2130        }
    21252131        WinSendMsg(hwnd, CM_SORTRECORD, MPFROMP(SortDirCnr),
    21262132                   MPFROMLONG(dcd->sortFlags));
Note: See TracChangeset for help on using the changeset viewer.