Changeset 739 for trunk/dll/dirsize.c


Ignore:
Timestamp:
Jul 24, 2007, 4:06:59 AM (14 years ago)
Author:
Steven Levine
Message:

More ticket #24 updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r738 r739  
    147147    else
    148148      DosError(FERR_DISABLEHARDERR);
    149     // fixme to not double free when pointers match
    150     pci->pszLongname = pci->pszFileName;
    151149    pci->rc.hptrIcon = hptrDir;
    152150    *pci->szDispAttr = 0;
     
    171169      p = pszFileName;
    172170    else
    173       p++;
    174     sp = (strchr(pszFileName, ' ') != NULL) ? "\"" : NullStr;
     171      p++;                              // After last backslash
     172    // Handle quoted names?
     173    sp = strchr(pszFileName, ' ') != NULL ? "\"" : NullStr;
     174    pci->pszFileName = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);       // fixme to optimize alloc
    175175    pp = pci->pszFileName;
    176176    if (*sp) {
    177       *pp = *sp;
     177      *pp = *sp;                        // Need quotes
    178178      pp++;
    179179      *pp = 0;
     
    183183      strcat(pp, sp);
    184184  }
     185  pci->pszLongname = pci->pszFileName;
    185186  pci->rc.pszIcon = pci->pszLongname;
    186187  pci->rc.flRecordAttr |= CRA_RECORDREADONLY;
     
    189190  else if (fForceLower)
    190191    strlwr(pci->pszFileName);
    191   // fixme to work - code is hiding file name from container but... 23 Jul 07 SHL
    192   pci->pszFileName = pci->pszFileName + strlen(pci->pszFileName);
     192  pci->pszDisplayName = pci->pszFileName + strlen(pci->pszFileName);
    193193  memset(&ri, 0, sizeof(RECORDINSERT));
    194194  ri.cb = sizeof(RECORDINSERT);
Note: See TracChangeset for help on using the changeset viewer.