Changeset 3215


Ignore:
Timestamp:
Apr 25, 2007, 3:27:40 AM (18 years ago)
Author:
bird
Message:

make the standard abs_path call deal with symlinks and stopped it from shaving off the root slash when a drive letter is present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/essentials/dev-lang/perl/os2/os2.c

    r3210 r3215  
    34723472        }
    34733473        if (dir == NULL) {
     3474#ifdef __KLIBC__
     3475        assert(MAXPATHLEN >= PATH_MAX);
     3476            if (realpath(path, p) != 0) {
     3477            RETVAL = p;
     3478        } else
     3479#endif
    34743480            if (_abspath(p, path, MAXPATHLEN) == 0) {
    34753481                RETVAL = p;
     
    35563562        /* Remove trailing slashes */
    35573563        l = strlen(RETVAL);
    3558         while (l > 0 && RETVAL[l-1] == '/')
     3564        while (l > 0 && RETVAL[l-1] == '/' && (l > 3 || RETVAL[1] != ':'))
    35593565            l--;
    35603566        ST(0) = sv_newmortal();
Note: See TracChangeset for help on using the changeset viewer.