VirtualBox

Changeset 1556 in kBuild for trunk


Ignore:
Timestamp:
Apr 23, 2008 1:23:21 AM (17 years ago)
Author:
bird
Message:

Fixed UNC build. (mkdir -p server/share/something failed because of bad UNC parsing.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/mkdir.c

    r1516 r1556  
    177177
    178178#if defined(_MSC_VER) || defined(__EMX__)
     179        /* correct slashes. */
    179180        p = strchr(path, '\\');
    180181        while (p) {
     
    191192                 ||  (p[0] >= 'a' && p[0] <= 'z'))
    192193            && p[1] == ':')
    193                 p += 2;
     194                p += 2; /* skip the drive letter */
    194195        else if (   p[0] == '/'
    195196                 && p[1] == '/'
    196197                 && p[2] != '/')
    197198        {
    198                 char *p2;
     199                /* UNC */
    199200                p += 2;
    200                 p2 = strchr(p, '/');
    201                 if (p2)
    202                         p = p2 + 1;
     201                while (*p && *p != '/') /* server */
     202                        p++;
     203                while (*p == '/')
     204                        p++;
     205                while (*p && *p != '/') /* share */
     206                        p++;
    203207        }
    204208#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette