Changeset 1354 for trunk/dll/rename.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/rename.c

    r1226 r1354  
    1717
    1818#include <string.h>
     19#include <ctype.h>
    1920
    2021#define INCL_WIN
     
    3637#include "commafmt.h"                   // CommaFmtULL
    3738#include "strips.h"                     // bstrip
     39#include "info.h"                       // driveflags
    3840
    3941MRESULT EXPENTRY RenameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     
    238240        CHAR newexist[CCHMAXPATH], fullname[CCHMAXPATH];
    239241        INT was;
    240         APIRET rc;
     242        APIRET rc;
     243        BOOL fResetVerify = FALSE;
    241244
    242245        *newexist = 0;
     
    247250            strcpy(fullname, newexist);
    248251          was = IsFile(fullname);
    249           if (was == -1) {
    250             rc = docopyf(MOVE, mv->target, "%s", fullname);
     252          if (was == -1) {
     253            if (fVerify && (driveflags[toupper(*mv->target) - 'A'] & DRIVE_WRITEVERIFYOFF ||
     254                              driveflags[toupper(*fullname) - 'A'] & DRIVE_WRITEVERIFYOFF)) {
     255              DosSetVerify(FALSE);
     256              fResetVerify = TRUE;
     257            }
     258            rc = docopyf(MOVE, mv->target, "%s", fullname);
     259            if (fResetVerify) {
     260              DosSetVerify(fVerify);
     261              fResetVerify = FALSE;
     262            }
    251263            if (rc) {
    252264              if ((LONG) rc > 0)
Note: See TracChangeset for help on using the changeset viewer.