Changeset 1875 for trunk/dll/treecnr.c
- Timestamp:
- Oct 5, 2015, 1:06:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1874 r1875 115 115 while avoiding thread 1 116 116 27 Sep 15 GKY DosSleep times in WaitFleshWorkListEmpty set by caller 117 04 Oct 15 GKY Move the eUnflesh call from UM_ENTER to the object window so WaitFleshWorkListEmpty 118 can be used (UM_ENTER is on TID 1); Prevent eUnflesh from running if no child 119 directories are present; treat floppies like invalid drives on rescan (IDM_UPDATE 120 to avoid them seen as directories and having random subdirectories attached to 121 them. 117 122 118 123 ***********************************************************************/ … … 860 865 return 0; 861 866 867 case UM_SETUP2: 868 { 869 PCNRITEM pci = (PCNRITEM) mp1; 870 PCNRITEM pciL; 871 872 if (pci) { 873 pciL = (PCNRITEM)WinSendMsg(dcd->hwndCnr, 874 CM_QUERYRECORD, 875 MPFROMP(pci), 876 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 877 if (pciL && (INT) pciL != -1) { 878 WaitFleshWorkListEmpty(NULL, 10); // 2015-08-13 SHL in case pci still in work list 879 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 880 } 881 if ((INT) mp2 == 21 && pci->rc.hptrIcon == hptrCDROM) 882 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 883 NotifyError(pci->pszFileName, (ULONG) mp2); 884 } 885 } 886 return 0; 887 862 888 case UM_SETUP: 863 889 # ifdef FORTIFY … … 977 1003 } 978 1004 } 979 else { 980 // find root record and strip it 981 pci = FindParentRecord(dcd->hwndCnr, pci); 982 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 983 WaitFleshWorkListEmpty(pci->pszFileName, 240); // 2015-08-19 SHL in case pci still in work list 984 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 1005 else { 1006 PCNRITEM pciL; 1007 // find root record and strip it if needed 1008 pci = FindParentRecord(dcd->hwndCnr, pci); 1009 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 1010 pciL = (PCNRITEM)WinSendMsg(dcd->hwndCnr, 1011 CM_QUERYRECORD, 1012 MPFROMP(pci), 1013 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 1014 if (pciL && (INT) pciL != -1) { 1015 WaitFleshWorkListEmpty(pci->pszFileName, 240); // 2015-08-19 SHL in case pci still in work list 1016 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 1017 } 985 1018 } 986 1019 } … … 1377 1410 } 1378 1411 return 0; 1379 1412 #if 0 1380 1413 case UM_SETUP2: 1381 1414 { 1382 1415 PCNRITEM pci = (PCNRITEM) mp1; 1383 1416 1384 if (pci) 1385 NotifyError(pci->pszFileName, (ULONG) mp2); 1386 } 1387 return 0; 1388 1417 if (pci) { 1418 WaitFleshWorkListEmpty(NULL, 10); // 2015-08-13 SHL in case pci still in work list 1419 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1420 if ((INT) mp2 == 21) 1421 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 1422 NotifyError(pci->pszFileName, (ULONG) mp2); 1423 } 1424 } 1425 return 0; 1426 #endif 1389 1427 case UM_SETUP: 1390 1428 # ifdef FORTIFY … … 2090 2128 else { 2091 2129 driveserial[x] = -1; 2092 //WaitFleshWorkListEmpty(NULL, 10); // 2015-08-13 SHL in case pci still in work list 2093 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2094 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 2095 PostMsg(hwnd, UM_SETUP2, MPFROMP(pci), MPFROMLONG(rc)); 2130 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 2131 if (dcd) 2132 PostMsg(dcd->hwndObject, UM_SETUP2, MPFROMP(pci), MPFROMLONG(rc)); 2096 2133 return 0; 2097 2134 } … … 2181 2218 } 2182 2219 else { 2183 2184 2220 if (!IsRoot(pci->pszFileName)) { 2221 NotifyError(pci->pszFileName, rc); 2185 2222 RemoveCnrItems(hwnd, pci, 1, CMA_FREE | CMA_INVALIDATE); 2186 2223 } … … 2882 2919 if (pci->attrFile & FILE_DIRECTORY) { 2883 2920 if (pci->flags & RECFLAGS_UNDERENV) 2884 2885 2886 2921 break; 2922 2923 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2887 2924 2888 2925 // Check if drive type might need update 2889 2926 if ((driveflag & (DRIVE_INVALID | DRIVE_NOPRESCAN)) || 2890 (~driveflag & DRIVE_NOPRESCAN && pci->rc.hptrIcon == hptrDunno) ) {2927 (~driveflag & DRIVE_NOPRESCAN && pci->rc.hptrIcon == hptrDunno) || x < 2) { 2891 2928 DriveFlagsOne(x, FileSystem, &volser); 2892 2929 driveflag = driveflags[x]; … … 2911 2948 PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID); 2912 2949 } 2913 //DbgMsg(pszSrcFile, __LINE__, " TreeCnrWndProc IDM_UPDATE %s", pci->pszFileName); // 2015-08-03 SHL FIXME debug2914 if (~driveflag & DRIVE_INVALID )2950 DbgMsg(pszSrcFile, __LINE__, " TreeCnrWndProc IDM_UPDATE %s", pci->pszFileName); // 2015-08-03 SHL FIXME debug 2951 if (~driveflag & DRIVE_INVALID || x < 2) 2915 2952 AddFleshWorkRequest(hwnd, pci, eFlesh); 2916 2953 }
Note:
See TracChangeset
for help on using the changeset viewer.