VirtualBox

Changeset 15813 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Jan 5, 2009 4:06:55 PM (16 years ago)
Author:
vboxsync
Message:

RTPathAbs: When the path is empty we return VERR_INVALID_PARAMETER like elsewhere, not the current directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/path-posix.cpp

    r15808 r15813  
    172172
    173173    /*
     174     * Validation.
     175     */
     176    AssertPtr(pszAbsPath);
     177    AssertPtr(pszPath);
     178    if (RT_UNLIKELY(!*pszPath))
     179        return VERR_INVALID_PARAMETER;
     180
     181    /*
    174182     * Make a clean working copy of the input.
    175183     */
     
    185193    size_t cchTmpPath = fsCleanPath(szTmpPath);
    186194
    187     /* fsCleanPath will leave the single dot alone, we don't need it here. */
     195    /*
     196     * Handle "." specially (fsCleanPath does).
     197     */
    188198    if (szTmpPath[0] == '.' && !szTmpPath[1])
    189         szTmpPath[0] = '\0';
     199        return RTPathGetCurrent(pszAbsPath, cchAbsPath);
    190200
    191201    /*
Note: See TracChangeset for help on using the changeset viewer.

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