Changeset 1318 for trunk/dll/worker.c
- Timestamp:
- Dec 5, 2008, 2:57:40 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/worker.c
r1316 r1318 30 30 drives list if it exists. Fix ability to deselect use of trash can. 31 31 01 Sep 08 GKY Add code to retry on Netdrives "pipe error" 32 04 Dec 08 GKY Add a DosSleep to allow file extract to complete before rescan 33 04 Dec 08 GKY Add mutex semaphore and disable fSyncUpdates for file deletes to prevent the creation 34 on dead CNRITEMS. 32 35 33 36 ***********************************************************************/ … … 474 477 if (needs_quoting(ex.masks) && !strchr(ex.masks, '\"')) 475 478 maskspaces = TRUE; 476 if (!runemf2(SEPARATE | WINDOWED|479 if (!runemf2(SEPARATE | WINDOWED | WAIT | 477 480 fArcStuffVisible ? 0 : (BACKGROUND | MINIMIZED), 478 481 HWND_DESKTOP, pszSrcFile, __LINE__, ex.extractdir, NULL, … … 483 486 *ex.masks ? ex.masks : "\"*\"", 484 487 maskspaces ? "\"" : NullStr) && 485 !stricmp(ex.extractdir, wk->directory)) { 486 if (WinIsWindow(hab2, wk->hwndCnr)) 488 !stricmp(ex.extractdir, wk->directory)) { 489 DosSleep(100); // wait for runemf2 to complete so rescan will actually show something 490 if (WinIsWindow((HAB) 0, wk->hwndCnr)) 487 491 WinSendMsg(wk->hwndCnr, 488 492 WM_COMMAND, … … 1597 1601 if (!wk->li->list || !wk->li->list[0]) 1598 1602 break; 1599 } 1603 } 1604 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1600 1605 for (x = 0; wk->li->list[x]; x++) { 1601 1606 fsa.attrFile = 0; … … 1622 1627 DosReleaseMutexSem(hmtxFM2Delete); 1623 1628 } 1624 else { 1629 else { 1630 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 1625 1631 /*sprintf(prompt, 1626 1632 GetPString(IDS_DELETINGTEXT), wk->li->list[x]); … … 1644 1650 } 1645 1651 else { 1646 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY1652 //DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1647 1653 error = DosDelete(wk->li->list[x]); 1648 DosReleaseMutexSem(hmtxFM2Delete);1654 //DosReleaseMutexSem(hmtxFM2Delete); 1649 1655 } 1650 1656 } 1651 1657 else { 1652 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY1658 //DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1653 1659 error = DosForceDelete(wk->li->list[x]); 1654 DosReleaseMutexSem(hmtxFM2Delete);1660 //DosReleaseMutexSem(hmtxFM2Delete); 1655 1661 } 1656 1662 if (error) { … … 1674 1680 } 1675 1681 else { 1676 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY1682 // DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1677 1683 error = DosDelete(wk->li->list[x]); 1678 DosReleaseMutexSem(hmtxFM2Delete);1684 // DosReleaseMutexSem(hmtxFM2Delete); 1679 1685 } 1680 1686 } 1681 1687 else { 1682 DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY1688 //DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY 1683 1689 error = DosForceDelete(wk->li->list[x]); 1684 DosReleaseMutexSem(hmtxFM2Delete);1690 //DosReleaseMutexSem(hmtxFM2Delete); 1685 1691 } 1686 1692 } 1687 } 1693 DosReleaseMutexSem(hmtxFM2Delete); 1694 } 1688 1695 if (error) { 1689 1696 if (LogFileHandle) … … 1708 1715 AddNote(prompt); 1709 1716 } 1710 if ( fSyncUpdates ||1711 AddToList(wk->li->list[x], &files, &numfiles, &numalloc)) 1717 if (//fSyncUpdates || 1718 AddToList(wk->li->list[x], &files, &numfiles, &numalloc)) { 1712 1719 Broadcast(hab2, 1713 1720 wk->hwndCnr, 1714 1721 UM_UPDATERECORD, 1715 MPFROMP(wk->li->list[x]), MPVOID); 1716 } 1722 MPFROMP(wk->li->list[x]), MPVOID); 1723 } 1724 } 1717 1725 } 1718 1726 break;
Note:
See TracChangeset
for help on using the changeset viewer.