Changeset 1315 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Dec 3, 2008, 7:28:47 PM (17 years ago)
Author:
Gregg Young
Message:

Improve multithread treecnr scan to prevent scan of "last" directory container prior to tree scan completion; prevents duplicate directory names in tree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1303 r1315  
    7070  01 Sep 08 GKY Save toolbars immediately on change. Add bmps for default toolbars
    7171  29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate.
     72  03 Dec 08 GKY Use StubbyScanCount to prevent scan of "last" directory container prior to
     73                tree scan completion; prevents duplicate directory names in tree.
    7274
    7375***********************************************************************/
     
    149151#include "wrappers.h"                   // xfree
    150152#include "fortify.h"
     153#include "filldir.h"                    // StubbyScanCount
    151154
    152155static BOOL CloseDirCnrChildren(HWND hwndClient);
     
    59275930        if (*argv[x] == '/' || *argv[x] == ';')
    59285931          continue;
    5929         if (!IsFile(argv[x]) && !FindDirCnrByName(argv[x], FALSE))
     5932        if (!IsFile(argv[x]) && !FindDirCnrByName(argv[x], FALSE)) {
     5933          DosSleep(10); // Give time for StubbyScanThreads to start
     5934          while (StubbyScanCount !=0)
     5935            DosSleep(50);
    59305936          OpenDirCnr((HWND) 0, hwndMain, hwndTree, TRUE, argv[x]);
     5937        }
    59315938      }
    59325939    }
Note: See TracChangeset for help on using the changeset viewer.