Changeset 1786
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1778 r1786 86 86 02 Mar 14 GKY Speed up intial drive scans Ticket 528 87 87 26 Jun 14 SHL Rework DirObjWndProc UM_RESCAN to avoid hanging FM/2 Lite when tree hidden 88 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 89 a trap when FM2 is shutdown while directory containers are still populating 88 90 89 91 ***********************************************************************/ … … 1210 1212 0, 1211 1213 0, 1212 SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER); 1214 SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER); 1215 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 1213 1216 FreeList(dcd->lastselection); 1214 1217 WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL); // 13 Apr 10 SHL Set NULL before freeing dcd … … 1630 1633 } 1631 1634 // 2014-06-11 SHL fm/2 lite can get here before drive scan completes 1632 if (!fInitialDriveScan)1633 1635 //if (!fInitialDriveScan) // 2014-08-30 GKY This doesn't seem to be needed 1636 PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID); 1634 1637 } 1635 1638 else { … … 3522 3525 0, 3523 3526 0, 3524 SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER); 3527 SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER); 3528 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 3525 3529 FreeList(dcd->lastselection); 3526 3530 free(dcd); -
trunk/dll/filter.c
r1782 r1786 22 22 31 May 11 SHL Rework Filter() for speed 23 23 28 Jun 14 GKY Fix errors identified with CPPCheck; 24 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 25 a trap when FM2 is shutdown while directory containers are still populating 24 26 25 27 ***********************************************************************/ … … 84 86 return TRUE; // No mask data 85 87 88 DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT); 86 89 pci = (PCNRITEM) rmini; 87 90 // Always show root directory 88 91 // 2011-05-31 SHL fixme to know if this is correct 89 92 if (!(*(pci->pszFileName + 3)) 90 || mask->fShowDirs && (pci->attrFile & FILE_DIRECTORY)) 93 || mask->fShowDirs && (pci->attrFile & FILE_DIRECTORY)) { 94 DosReleaseMutexSem(hmtxFiltering); 91 95 return TRUE; 96 } 92 97 93 98 if ((~mask->attrFile & FILE_HIDDEN && pci->attrFile & FILE_HIDDEN) || … … 95 100 (~mask->attrFile & FILE_READONLY && pci->attrFile & FILE_READONLY) || 96 101 (~mask->attrFile & FILE_ARCHIVED && pci->attrFile & FILE_ARCHIVED) || 97 (~mask->attrFile & FILE_DIRECTORY && pci->attrFile & FILE_DIRECTORY)) 102 (~mask->attrFile & FILE_DIRECTORY && pci->attrFile & FILE_DIRECTORY)) { 103 DosReleaseMutexSem(hmtxFiltering); 98 104 return FALSE; 105 } 99 106 100 107 if ((mask->antiattr & FILE_HIDDEN && ~pci->attrFile & FILE_HIDDEN) || … … 102 109 (mask->antiattr & FILE_READONLY && ~pci->attrFile & FILE_READONLY) || 103 110 (mask->antiattr & FILE_ARCHIVED && ~pci->attrFile & FILE_ARCHIVED) || 104 (mask->antiattr & FILE_DIRECTORY && ~pci->attrFile & FILE_DIRECTORY)) 111 (mask->antiattr & FILE_DIRECTORY && ~pci->attrFile & FILE_DIRECTORY)) { 112 DosReleaseMutexSem(hmtxFiltering); 105 113 return FALSE; 106 107 if (!*mask->szMask) 108 return TRUE; // No masks 114 } 115 116 if (mask && !*mask->szMask) { 117 DosReleaseMutexSem(hmtxFiltering); 118 return TRUE; 119 }// No masks 109 120 110 121 // Have mask string … … 118 129 119 130 if (!mask->pszMasks[1]) { 131 DosReleaseMutexSem(hmtxFiltering); 120 132 // Just one mask string 121 133 return wildcard(strchr(mask->szMask, '\\') || … … 153 165 } 154 166 } // for 155 167 DosReleaseMutexSem(hmtxFiltering); 156 168 return matched; 157 169 } -
trunk/dll/init.c
r1778 r1786 129 129 Added option to suppress message regarding missing bzip2.exe 130 130 or gzip.exe on TAR.B/GZ archives. 131 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 132 a trap when FM2 is shutdown while directory containers are still populating 131 133 132 134 ***********************************************************************/ … … 228 230 HMTX hmtxFM2Globals; 229 231 HMTX hmtxScanning; 232 HMTX hmtxFiltering; 230 233 HEV hevTreeCnrScanComplete; 231 234 ULONG OS2ver[2]; … … 590 593 save_dir(s); 591 594 AddBackslashToPath(s); 592 //if (s[strlen(s) - 1] != '\\')593 // strcat(s, "\\");594 595 enddir = &s[strlen(s)]; 595 596 if (*ArcTempRoot) { … … 1161 1162 if (DosCreateMutexSem(NULL, &hmtxFM2Delete, 0L, FALSE)) 1162 1163 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1163 PCSZ_DOSCREATEMUTEXSEM); 1164 PCSZ_DOSCREATEMUTEXSEM); 1165 if (DosCreateMutexSem(NULL, &hmtxFiltering, 0L, FALSE)) 1166 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1167 PCSZ_DOSCREATEMUTEXSEM); 1164 1168 if (DosCreateEventSem(NULL, &hevTreeCnrScanComplete, 0L, TRUE)) 1165 1169 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, -
trunk/dll/init.h
r1753 r1786 39 39 Added option to suppress message regarding missing bzip2.exe 40 40 or gzip.exe on TAR.B/GZ archives. 41 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 42 a trap when FM2 is shutdown while directory containers are still populating 41 43 42 44 ***********************************************************************/ … … 236 238 extern HMTX hmtxFM2Delete; 237 239 extern HMTX hmtxScanning; 240 extern HMTX hmtxFiltering; 238 241 extern HEV hevTreeCnrScanComplete; 239 242 #endif
Note:
See TracChangeset
for help on using the changeset viewer.