Changeset 1313
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r1312 r1313 158 158 159 159 #pragma data_seg(GLOBAL1) 160 HMTX hmtx DeleteDir;160 HMTX hmtxFM2Delete; 161 161 HMTX hmtxFM2Globals; 162 162 ULONG OS2ver[2]; … … 1185 1185 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1186 1186 "DosCreateMutexSem"); 1187 if (DosCreateMutexSem("\\SEM\\DELET DIR", &hmtxDeleteDir, 0L, FALSE))1187 if (DosCreateMutexSem("\\SEM\\DELETE1", &hmtxFM2Delete, 0L, FALSE)) 1188 1188 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1189 1189 "DosCreateMutexSem"); -
trunk/dll/init.h
r1312 r1313 92 92 extern ULONGLONG ullTmpSpaceNeeded; 93 93 extern HMTX hmtxFM2Globals; 94 extern HMTX hmtx DeleteDir;94 extern HMTX hmtxFM2Delete; 95 95 96 96 #endif // INIT_H -
trunk/dll/worker.c
r1312 r1313 1605 1605 &fsa, (ULONG) sizeof(FILESTATUS3)); 1606 1606 if (fsa.attrFile & FILE_DIRECTORY) { 1607 //priority_bumped();1608 DosRequestMutexSem(hmtxDeleteDir, SEM_INDEFINITE_WAIT);1609 1607 sprintf(prompt, 1610 1608 GetPString(IDS_DELETINGTEXT), wk->li->list[x]); 1609 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1611 1610 AddNote(prompt); 1612 1611 error = (APIRET) wipeallf("%s%s*", … … 1622 1621 else 1623 1622 DosDeleteDir(wk->li->list[x]); 1624 DosReleaseMutexSem(hmtxDeleteDir); 1625 //priority_normal(); 1623 DosReleaseMutexSem(hmtxFM2Delete); 1626 1624 } 1627 1625 else { … … 1646 1644 error = WinMoveObject(hObjectofObject, hObjectdest, 0); 1647 1645 } 1648 else 1649 error = DosDelete(wk->li->list[x]); 1646 else { 1647 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1648 error = DosDelete(wk->li->list[x]); 1649 DosReleaseMutexSem(hmtxFM2Delete); 1650 } 1650 1651 } 1651 else 1652 error = DosForceDelete(wk->li->list[x]); 1652 else { 1653 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1654 error = DosForceDelete(wk->li->list[x]); 1655 DosReleaseMutexSem(hmtxFM2Delete); 1656 } 1653 1657 if (error) { 1654 1658 DosError(FERR_DISABLEHARDERR); … … 1670 1674 error = WinMoveObject(hObjectofObject, hObjectdest, 0); 1671 1675 } 1672 else 1673 error = DosDelete(wk->li->list[x]); 1676 else { 1677 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1678 error = DosDelete(wk->li->list[x]); 1679 DosReleaseMutexSem(hmtxFM2Delete); 1680 } 1674 1681 } 1675 else 1676 error = DosForceDelete(wk->li->list[x]); 1682 else { 1683 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1684 error = DosForceDelete(wk->li->list[x]); 1685 DosReleaseMutexSem(hmtxFM2Delete); 1686 } 1677 1687 } 1678 1688 } … … 1699 1709 AddNote(prompt); 1700 1710 } 1701 if ( (fSyncUpdates && !(fsa.attrFile & FILE_DIRECTORY))||1711 if (fSyncUpdates || 1702 1712 AddToList(wk->li->list[x], &files, &numfiles, &numalloc)) 1703 1713 Broadcast(hab2,
Note:
See TracChangeset
for help on using the changeset viewer.