Changeset 1354 for trunk/dll/worker.c


Ignore:
Timestamp:
Dec 25, 2008, 11:43:34 PM (17 years ago)
Author:
Gregg Young
Message:

Added driveflags to over ride write verify for USB removable drives that fail when it is on (Ticket 323); A flag to prevent directory name from being broadcast to drives in the tree cnr prior to a recursive scan of the drive (causes dbl directory names Ticket 321) Add option for multithreaded recursive scan of user selected drives at startup (Ticket 322).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/worker.c

    r1351 r1354  
    679679                    INT type;
    680680                    FILESTATUS4L fs4;
    681                     BOOL isnewer, existed;
     681                    BOOL isnewer, existed, fResetVerify = FALSE;
    682682
    683683                    type = (wk->li->type == IDM_RENAME) ? MOVE :
     
    805805                            (usedtarget) ? GetPString(IDS_TOTARGETTEXT) :
    806806                            NullStr);
    807                     AddNote(message);
     807                    AddNote(message);
     808                    if (fVerify && (driveflags[toupper(*wk->li->targetpath) - 'A'] & DRIVE_WRITEVERIFYOFF) |
     809                        (driveflags[toupper(*wk->li->list[x]) - 'A'] & DRIVE_WRITEVERIFYOFF)) {
     810                      DosSetVerify(FALSE);
     811                      fResetVerify = TRUE;
     812                    }
    808813                    if (plen) {
    809814                      /* make directory/ies, if required */
     
    822827                    if (fRealIdle)
    823828                      priority_idle();
    824                     rc = docopyf(type, wk->li->list[x], "%s", newname);
     829                    rc = docopyf(type, wk->li->list[x], "%s", newname);
     830                    if (fResetVerify) {
     831                      DosSetVerify(fVerify);
     832                      fResetVerify = FALSE;
     833                    }
    825834                    priority_normal();
    826835                    if (rc) {
     
    907916                                wk->li->list[x],
    908917                                GetPString(IDS_TOTEXT), newname);
    909                       if (//fSyncUpdates ||
     918                      if ((driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED) &&
    910919                          AddToList(wk->li->list[x],
    911920                                    &files, &numfiles, &numalloc))
     
    914923                                  UM_UPDATERECORD,
    915924                                  MPFROMP(wk->li->list[x]), MPVOID);
    916                       if (//fSyncUpdates ||
     925                      if ((driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED) &&
    917926                          AddToList(newname, &files, &numfiles, &numalloc))
    918927                        Broadcast(hab2,
     
    10191028        Abort:
    10201029
    1021           if (files) {
    1022             Broadcast(hab2,
    1023                       wk->hwndCnr,
    1024                       UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
     1030          if (files) {
     1031            if (driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED)
     1032              Broadcast(hab2,
     1033                        wk->hwndCnr,
     1034                        UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
    10251035           // DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", *files);
    10261036            FreeList(files);
     
    16111621                if (!wk->li->list || !wk->li->list[0])
    16121622                  break;
    1613               }
     1623              }
     1624              if (fVerify && driveflags[toupper(*wk->li->list[0]) - 'A'] & DRIVE_WRITEVERIFYOFF)
     1625                DosSetVerify(FALSE);
    16141626              DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    16151627              for (x = 0; wk->li->list[x]; x++) {
     
    16981710                                __LINE__,
    16991711                                GetPString(IDS_DELETEFAILED2TEXT),
    1700                                 wk->li->list[x]) == MBID_CANCEL)
    1701                     break;
     1712                                wk->li->list[x]) == MBID_CANCEL) {
     1713                    DosSetVerify(fVerify);
     1714                    break;
     1715                  }
    17021716                }
    17031717                else {
     
    17171731                }
    17181732              } // for
    1719             }
     1733            }
     1734            if (fVerify)
     1735              DosSetVerify(fVerify);
    17201736            break;
    17211737          } // switch
Note: See TracChangeset for help on using the changeset viewer.