Changeset 1351 for trunk/dll/worker.c


Ignore:
Timestamp:
Dec 21, 2008, 12:41:07 AM (17 years ago)
Author:
Gregg Young
Message:

Additional code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/worker.c

    r1335 r1351  
    911911                                    &files, &numfiles, &numalloc))
    912912                        Broadcast(hab2,
    913                                   wk->hwndCnr,
     913                                  wk->hwndCnr,
    914914                                  UM_UPDATERECORD,
    915                                   MPFROMP(wk->li->list[x]), MPVOID);
     915                                  MPFROMP(wk->li->list[x]), MPVOID);
    916916                      if (//fSyncUpdates ||
    917917                          AddToList(newname, &files, &numfiles, &numalloc))
    918918                        Broadcast(hab2,
    919                                   wk->hwndCnr,
    920                                   UM_UPDATERECORD, MPFROMP(newname), MPVOID);
     919                                  wk->hwndCnr,
     920                                  UM_UPDATERECORD, MPFROMP(newname), MPVOID);
    921921                    }
    922922                  }
     
    926926              case IDM_COMPARE:
    927927                if ((!IsFile(wk->li->targetpath) ||
    928                      IsRoot(wk->li->targetpath)) &&
     928                     IsRoot(wk->li->targetpath)) &&
    929929                    (!IsFile(wk->li->list[x]) || IsRoot(wk->li->list[x]))) {
    930930                  if (!*dircompare && WinIsWindow(hab2, wk->hwndCnr))
     
    10221022            Broadcast(hab2,
    10231023                      wk->hwndCnr,
    1024                       UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
     1024                      UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
     1025           // DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", *files);
    10251026            FreeList(files);
    10261027          }
     
    10881089            Broadcast(hab2,
    10891090                      wk->hwndCnr,
    1090                       UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
     1091                      UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
    10911092            break;
    10921093
     
    12111212                Broadcast(hab2,
    12121213                          wk->hwndCnr,
    1213                           UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
     1214                          UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
    12141215            }
    12151216            break;
     
    12311232              Broadcast(hab2,
    12321233                        wk->hwndCnr,
    1233                         UM_UPDATERECORD, MPFROMP(wk->li->targetpath), MPVOID);
     1234                        UM_UPDATERECORD, MPFROMP(wk->li->targetpath), MPVOID);
    12341235            }
    12351236            break;
     
    15001501                Broadcast(hab2,
    15011502                          wk->hwndCnr,
    1502                           UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
     1503                          UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
    15031504            }
    15041505            break;
     
    15151516              HOBJECT hObjectdest, hObjectofObject;
    15161517              BYTE G_abSupportedDrives[24] = {0};
    1517               ULONG cbSupportedDrives = sizeof(G_abSupportedDrives);
     1518              ULONG cbSupportedDrives = sizeof(G_abSupportedDrives);
    15181519
    15191520              for (x = 0; wk->li->list[x]; x++) {
     
    16191620                                 &fsa, (ULONG) sizeof(FILESTATUS3));
    16201621                if (fsa.attrFile & FILE_DIRECTORY) {
    1621                   /*sprintf(prompt,
    1622                           GetPString(IDS_DELETINGTEXT), wk->li->list[x]);
    1623                   AddNote(prompt);*/ //Duplicate call 12-03-08 GKY
    1624                   DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    16251622                  error = (APIRET) wipeallf("%s%s*",
    16261623                                            wk->li->list[x],
     
    16341631                  else
    16351632                    DosDeleteDir(wk->li->list[x]);
    1636                   DosReleaseMutexSem(hmtxFM2Delete);
    1637                 }
    1638                 else {
    1639                   DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08
    1640                   /*sprintf(prompt,
    1641                           GetPString(IDS_DELETINGTEXT), wk->li->list[x]);
    1642                   AddNote(prompt); */  //Duplicate call 12-03-08 GKY
     1633                }
     1634                else {
     1635
    16431636                  DosError(FERR_DISABLEHARDERR);
    1644                   if (wk->li->type == IDM_DELETE){
     1637                  if (wk->li->type == IDM_DELETE) {
    16451638                    hObjectdest = WinQueryObject("<XWP_TRASHCAN>");
    16461639                    PrfQueryProfileData(HINI_USER,
     
    16581651                        error = WinMoveObject(hObjectofObject, hObjectdest, 0);
    16591652                    }
    1660                     else {
    1661                       //DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    1662                       error = DosDelete(wk->li->list[x]);
    1663                       //DosReleaseMutexSem(hmtxFM2Delete);
     1653                    else {
     1654                      error = DosDelete(wk->li->list[x]);
    16641655                    }
    16651656                  }
    1666                   else {
    1667                     //DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    1668                     error = DosForceDelete(wk->li->list[x]);
    1669                     //DosReleaseMutexSem(hmtxFM2Delete);
    1670                   }
    1671                   if (error) {
    1672                     DosError(FERR_DISABLEHARDERR);
     1657                  else {
     1658                    error = DosForceDelete(wk->li->list[x]); ;
     1659                  }
     1660                  if (error) {
     1661                    DosError(FERR_DISABLEHARDERR);
    16731662                    make_deleteable(wk->li->list[x]);
    16741663                    if (wk->li->type == IDM_DELETE){
     
    16881677                          error = WinMoveObject(hObjectofObject, hObjectdest, 0);
    16891678                      }
    1690                       else {
    1691                        // DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    1692                         error = DosDelete(wk->li->list[x]);
    1693                        // DosReleaseMutexSem(hmtxFM2Delete);
     1679                      else {
     1680                        error = DosDelete(wk->li->list[x]);
    16941681                      }
    16951682                    }
    1696                     else {
    1697                       //DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    1698                       error = DosForceDelete(wk->li->list[x]);
    1699                       //DosReleaseMutexSem(hmtxFM2Delete);
     1683                    else {
     1684                      error = DosForceDelete(wk->li->list[x]);
    17001685                    }
    17011686                  }
     
    17381723            Broadcast(hab2,
    17391724                      wk->hwndCnr,
    1740                       UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
     1725                      UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
    17411726            FreeList(files);
    17421727          }
Note: See TracChangeset for help on using the changeset viewer.