Changeset 1438 for trunk/dll/dirsize.c


Ignore:
Timestamp:
Jun 28, 2009, 10:47:00 PM (16 years ago)
Author:
Gregg Young
Message:

Improved drivebar changes; Added AddBackslashToPath() to remove repeatative code. replaced "
" with PCSZ variable; ANY_OBJ added the DosAlloc... (experimental)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r1435 r1438  
    4545  08 Mar 09 GKY Renamed commafmt.h i18nutil.h
    4646  08 Mar 09 GKY Additional strings move to PCSZs in init.c
     47  28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code.
    4748
    4849***********************************************************************/
     
    8586#include "fortify.h"
    8687#include "excputil.h"                   // xbeginthread
     88#include "pathutil.h"                   // AddBackslashToPath
    8789
    8890typedef struct
     
    151153
    152154  strcpy(maskstr, pszFileName);
    153   if (maskstr[strlen(maskstr) - 1] != '\\')
    154     strcat(maskstr, "\\");
     155  AddBackslashToPath(maskstr);
     156  //if (maskstr[strlen(maskstr) - 1] != '\\')
     157  //  strcat(maskstr, "\\");
    155158  pEndMask = &maskstr[strlen(maskstr)]; // Point after last backslash
    156159  strcat(maskstr, "*");
     
    873876            memset(szTemp, 0, sizeof(szTemp));
    874877            strcpy(szTemp, pci->pszFileName);
    875             strrev(szTemp);
    876             if (*szFileName && *szTemp != '\\')
    877               strcat(szFileName, "\\");
     878            strrev(szTemp);
     879            AddBackslashToPath(szFileName);
     880            //if (*szFileName && *szTemp != '\\')
     881            //  strcat(szFileName, "\\");
    878882            strcat(szFileName, szTemp);
    879883            pci = WinSendDlgItemMsg(hwnd, DSZ_CNR, CM_QUERYRECORD,
     
    951955        else
    952956          strcpy(szFileName, pFM2SaveDirectory);
    953         sprintf(&szFileName[strlen(szFileName)], "\\%csizes.Rpt",
     957        sprintf(&szFileName[strlen(szFileName)], "%s%csizes.Rpt", PCSZ_BACKSLASH,
    954958                (pState) ? toupper(*pState->szDirName) : '+');
    955959        if (export_filename(hwnd, szFileName, FALSE) && *szFileName) {
Note: See TracChangeset for help on using the changeset viewer.