Changeset 1671


Ignore:
Timestamp:
Sep 5, 2012, 8:19:29 PM (13 years ago)
Author:
Steven Levine
Message:

Correct UM_COLLECTFROMFILE bad list file reporting
Sync collector menu with docs

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/collect.c

    r1664 r1671  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2003, 2011 Steven H. Levine
     9  Copyright (c) 2003, 2012 Steven H. Levine
    1010
    1111  15 Oct 02 MK Baseline
     
    8181  04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu and as part of copy, move and
    8282                delete operations
     83  05 Sep 12 SHL Correct UM_COLLECTFROMFILE bad list file reporting
    8384
    8485***********************************************************************/
     
    845846
    846847    if (dcd && mp1) {
     848      // mp1 is pszFileName, mp2 is unused
    847849      FILESTATUS4L fs4;
    848850      PCNRITEM pci;
     
    851853      FILE *fp;
    852854      ULONG errs = 0;
    853       BOOL first = FALSE;
     855      BOOL first = TRUE; // 2012-09-05 SHL
    854856      size_t c;
    855857      CHAR *moder = "r";
     
    871873          c = strlen(fullname);
    872874          if (c + 1 >= sizeof(fullname))
    873             errs++;
     875            errs++;                     // Name too long
    874876          else if (!c || (fullname[c - 1] != '\n' && fullname[c - 1] != '\r'))
    875             errs++;
     877            errs++;                     // Probably reading a binary file
    876878          else {
    877879            bstripcr(fullname);
    878880
    879881            if (*fullname == '\"') {
     882              // Strip quotes
    880883              memmove(fullname, fullname + 1, strlen(fullname) + 1);
    881884              lstrip(fullname);
     
    886889            }
    887890            else {
     891              // Strip trailing spaces
    888892              p = strchr(fullname, ' ');
    889893              if (p)
     
    898902                              FALSE,
    899903                              TRUE)) {
     904              // Already in container
    900905              pci = UpdateCnrRecord(dcd->hwndCnr, fullname, FALSE, dcd);
    901906              if (Filter((PMINIRECORDCORE) pci, (PVOID) & dcd->mask)) {
     
    911916                                  &fs4,
    912917                                  sizeof(fs4))) {
    913               // collect it
     918              // Add to collector containter
    914919              pci = WinSendMsg(dcd->hwndCnr,
    915920                               CM_ALLOCRECORD,
     
    932937            }
    933938            else
    934               errs++;
     939              errs++;                   // Something wrong with filename or file
    935940          }
    936941          if (errs > (first ? 0 : 50)) {
     
    942947
    943948            if (ret == MBID_NO)
    944               break;
     949              break;                    // Give up
    945950            if (!first)
    946951              errs = 0;
     
    948953              first = FALSE;
    949954          }
    950         }                               // while not eof
     955        }  // while not eof
    951956        fclose(fp);
    952       }
     957      } // if file opened
    953958      free(mp1);
    954959    }
  • trunk/dll/fm3res.rc

    r1666 r1671  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2003, 2009 Steven H. Levine
     9  Copyright (c) 2003, 2012 Steven H. Levine
    1010
    1111  08 Feb 03 SHL Enable SYS_FRAME
     
    6161  04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of
    6262                copy, move and delete operations
     63  05 Sep 12 SHL Sync collector menu with docs
    6364 
    6465***********************************************************************/
     
    15641565  }
    15651566  MENUITEM "",                  -1,                   MIS_SEPARATOR
    1566   MENUITEM "Collect list in file(s)",IDM_COLLECTFROMFILE
     1567  MENUITEM "Collect from list file(s)",IDM_COLLECTFROMFILE
    15671568  MENUITEM "Archive...\tCtrl + A",  IDM_ARCHIVE
    15681569  MENUITEM "Extract...\tCtrl + x",  IDM_EXTRACT
Note: See TracChangeset for help on using the changeset viewer.