Changeset 1312 for trunk/dll/worker.c


Ignore:
Timestamp:
Dec 3, 2008, 1:47:37 AM (17 years ago)
Author:
Gregg Young
Message:

Fix for traps caused by race condition on directory deletes. This disables immediate updates for deleted directory and set a semaphore to allow the delete to complete before update. It also quotes the * on the extract command line which appears to allow tar 1.15 and higher to work. (Ticket 304)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/worker.c

    r1275 r1312  
    481481                               ex.arcname,
    482482                               maskspaces ? "\"" : NullStr,
    483                                *ex.masks ? ex.masks : "*",
     483                               *ex.masks ? ex.masks : "\"*\"",
    484484                               maskspaces ? "\"" : NullStr) &&
    485485                      !stricmp(ex.extractdir, wk->directory)) {
     
    16041604                                 FIL_STANDARD,
    16051605                                 &fsa, (ULONG) sizeof(FILESTATUS3));
    1606                 if (fsa.attrFile & FILE_DIRECTORY) {
     1606                if (fsa.attrFile & FILE_DIRECTORY) {
     1607                  //priority_bumped();
     1608                  DosRequestMutexSem(hmtxDeleteDir, SEM_INDEFINITE_WAIT);
    16071609                  sprintf(prompt,
    16081610                          GetPString(IDS_DELETINGTEXT), wk->li->list[x]);
     
    16191621                    error = DosDeleteDir(wk->li->list[x]);
    16201622                  else
    1621                     DosDeleteDir(wk->li->list[x]);
     1623                    DosDeleteDir(wk->li->list[x]);
     1624                  DosReleaseMutexSem(hmtxDeleteDir);
     1625                  //priority_normal();
    16221626                }
    16231627                else {
     
    16951699                  AddNote(prompt);
    16961700                }
    1697                 if (fSyncUpdates ||
     1701                if ((fSyncUpdates  && !(fsa.attrFile & FILE_DIRECTORY)) ||
    16981702                    AddToList(wk->li->list[x], &files, &numfiles, &numalloc))
    16991703                  Broadcast(hab2,
Note: See TracChangeset for help on using the changeset viewer.