Changeset 2524 for branches


Ignore:
Timestamp:
Feb 5, 2006, 3:11:07 AM (20 years ago)
Author:
bird
Message:

#40: Fixed double slash preventing root directories from being opened.

Location:
branches/libc-0.6/src/emx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/ChangeLog.LIBC

    r2523 r2524  
    1212        o #25: Ensure correct address length returns from recvmsg and recvfrom.
    1313    - libc:
     14        o #40: Fixed double slash preventing root directories from being opened.
    1415        o #23: Fixed two incorrect EA size fields, now creating symlinks really works.
    1516        o #21: Restrict reading and writing of UnixEAs to HPFS, JFS, FAT and RAMFS.
  • branches/libc-0.6/src/emx/src/lib/sys/b_dir.c

    r2424 r2524  
    368368             */
    369369            char   *psz = strchr(pszNativePath, '\0');
    370             psz[0] = '/';
    371             psz[1] = '*';
    372             psz[2] = '\0';
     370            if (psz[-1] != '/' && psz[-1] != '\\')
     371            {
     372                psz[0] = '/';
     373                psz[1] = '*';
     374                psz[2] = '\0';
     375            }
     376            else
     377            {
     378                psz[0] = '*';
     379                psz[1] = '\0';
     380            }
    373381            bzero(Tmp.uBuf.pv, Tmp.cbBuf);
    374382            FS_VAR_SAVE_LOAD();
     
    380388                              &Tmp.cFiles,
    381389                              Tmp.fType);
     390            *psz = '\0';
    382391            if (!rc)
    383392            {
Note: See TracChangeset for help on using the changeset viewer.