Changeset 1550 for trunk/dll/filldir.c
- Timestamp:
- Nov 3, 2010, 3:50:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filldir.c
r1549 r1550 135 135 static PSZ pszSrcFile = __FILE__; 136 136 static BOOL fFirstTime; 137 INT FixedVolume = 0; 137 138 138 139 #pragma data_seg(GLOBAL1) … … 215 216 HAB thab; 216 217 HMQ hmq = (HMQ) 0; 217 BOOL ok; 218 //BOOL ok; 219 static INT ProcessDirCount = 0; 218 220 219 221 DosError(FERR_DISABLEHARDERR); … … 231 233 IncrThreadUsage(); 232 234 priority_normal(); 233 ok = Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 234 if (ok) { 235 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) { 236 ULONG flags = driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A']; 237 238 if ((fRScanLocal && ~flags & DRIVE_REMOTE && ~flags & DRIVE_VIRTUAL) || 239 (fRScanRemote && flags & DRIVE_REMOTE) || 240 (fRScanVirtual && flags & DRIVE_VIRTUAL)) { 241 if (!(flags & ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) || 242 (fRScanSlow ? 0 : DRIVE_SLOW)))) { 243 UnFlesh(StubbyScan->hwndCnr, StubbyScan->pci); 244 Flesh(StubbyScan->hwndCnr, StubbyScan->pci); 245 } 246 } 247 } 248 } 235 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) { 236 ULONG flags = driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A']; 237 238 if ((fRScanLocal && ~flags & DRIVE_REMOTE && ~flags & DRIVE_VIRTUAL) || 239 (fRScanRemote && flags & DRIVE_REMOTE) || 240 (fRScanVirtual && flags & DRIVE_VIRTUAL)) { 241 if (!(flags & ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) || 242 (fRScanSlow ? 0 : DRIVE_SLOW)))) { 243 UnFlesh(StubbyScan->hwndCnr, StubbyScan->pci); 244 Flesh(StubbyScan->hwndCnr, StubbyScan->pci); 245 } 246 } 247 else { 248 Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 249 //if (!ok) 250 // FixedVolume--; 251 } 252 } 249 253 WinDestroyMsgQueue(hmq); 250 254 } … … 254 258 free(StubbyScan); 255 259 } // if StubbyScan 260 ProcessDirCount++; 261 DbgMsg(pszSrcFile, __LINE__, "ProcessDirCount %i FixedVolume %i", 262 ProcessDirCount, FixedVolume); 263 if (fInitialDriveScan && ProcessDirCount >= FixedVolume) { 264 fInitialDriveScan = FALSE; 265 DosPostEventSem(hevInitialCnrScanComplete); 266 DosCloseEventSem(hevInitialCnrScanComplete); 267 if (fSwitchTree && hwndTree && fSaveState && pszFocusDir) { 268 // Keep drive tree in sync with directory container 269 if (hwndMain) { 270 //if (TopWindow(hwndMain, (HWND) 0) == dcd->hwndFrame) 271 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID)) 272 free(pszFocusDir); 273 } 274 else { 275 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID)) 276 free(pszFocusDir); 277 } 278 } 279 } 256 280 # ifdef FORTIFY 257 281 Fortify_LeaveScope(); … … 260 284 } 261 285 286 #if 0 262 287 VOID ProcessDirectoryThread(VOID * arg) 263 288 { … … 265 290 HAB thab; 266 291 HMQ hmq = (HMQ) 0; 292 267 293 268 294 DosError(FERR_DISABLEHARDERR); … … 273 299 274 300 ProcessDir = (PROCESSDIR *)arg; 275 if (ProcessDir && ProcessDir->pciParent && ProcessDir->pciParent->pszFileName && ProcessDir->hwndCnr) { 301 if (ProcessDir && ProcessDir->pciParent && ProcessDir->pciParent->pszFileName && 302 ProcessDir->hwndCnr) { 276 303 thab = WinInitialize(0); 277 304 if (thab) { … … 297 324 free(ProcessDir); 298 325 } // if ProcessDir 299 if (fInitialDriveScan) {300 fInitialDriveScan = FALSE;301 DosPostEventSem(hevInitialCnrScanComplete);302 DosCloseEventSem(hevInitialCnrScanComplete);303 }304 326 # ifdef FORTIFY 305 327 Fortify_LeaveScope(); … … 307 329 308 330 } 331 # endif 309 332 310 333 static HPOINTER IDFile(PSZ p) … … 1369 1392 1370 1393 if (~driveflags[iDrvNum] & DRIVE_REMOVABLE) { 1371 // Fixed volume 1394 // Fixed volume 1395 if (~flags & DRIVE_INVALID && ~flags & DRIVE_NOPRESCAN) 1396 FixedVolume++; 1372 1397 pci->attrFile |= FILE_DIRECTORY; 1373 1398 DosError(FERR_DISABLEHARDERR);
Note:
See TracChangeset
for help on using the changeset viewer.