Changeset 1952 for trunk/src


Ignore:
Timestamp:
May 2, 2005, 5:55:14 AM (20 years ago)
Author:
bird
Message:

Unix root rewrite rule ends it's pszTo with a slash, this caused two slashes and thus UNC trouble.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/sys/pathrewrite.c

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r1951 r1952  
    962962        if (pszBuf)
    963963        {
     964            char *pszBufIn = pszBuf;
    964965            if (cchBuf < cchTotal)
    965966            {
     
    968969            }
    969970            memcpy(pszBuf, pRuleBest->pszTo, pRuleBest->cchTo);
    970             pszBuf[pRuleBest->cchTo] = '\\';
    971             memcpy(pszBuf + pRuleBest->cchTo + 1, pszBest, cch + 1);
    972             LIBCLOG_MSG("rewritten: '%s' (partial)\n", pszBuf);
     971            pszBuf += pRuleBest->cchTo;
     972            if (    pszBuf[-1] != '/'
     973                &&  pszBuf[-1] != '\\')
     974                *pszBuf++ = '\\';
     975            memcpy(pszBuf, pszBest, cch + 1);
     976            LIBCLOG_MSG("rewritten: '%s' (partial)\n", pszBufIn); (void)pszBufIn;
    973977        }
    974978        LIBCLOG_RETURN_INT(cchTotal);
Note: See TracChangeset for help on using the changeset viewer.