Changeset 15756 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Dec 25, 2008 11:12:42 AM (16 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/path-posix.cpp
r15754 r15756 180 180 fsCleanPath(szTmpPath); 181 181 182 /* 183 * fsCleanPath will leave the single dot alone, we don't need it here. 184 */ 185 if (szTmpPath[0] == '.' && !szTmpPath[1]) 186 szTmpPath[0] = '\0'; 187 182 188 char *pszCur = szTmpPath; 183 189 … … 214 220 215 221 { 216 /*217 * Convert result and copy it to the return buffer.218 */219 222 char *pszUtf8CurDir; 220 223 int rc = rtPathFromNative(&pszUtf8CurDir, szCurDir); -
trunk/src/VBox/Runtime/r3/win/path-win.cpp
r15755 r15756 99 99 RTDECL(int) RTPathAbs(const char *pszPath, char *pszAbsPath, size_t cchAbsPath) 100 100 { 101 Assert(VALID_PTR(pszPath)); 102 103 /* 104 * When the input path is just "", GetFullPathNameW() will return a full 105 * executable name instead of the current directory (as the POSIX sister . 106 * does). Go the POSIX way with the following workaround. 107 */ 108 static const char szSingleDot[] = "."; 109 if (!pszPath[0]) 110 pszPath = szSingleDot; 111 101 112 /* 102 113 * Convert to UTF-16, call Win32 API, convert back. -
trunk/src/VBox/Runtime/testcase/tstPath.cpp
r15754 r15756 101 101 { 102 102 #if defined (RT_OS_OS2) || defined (RT_OS_WINDOWS) 103 //{ NULL, "", VINF_SUCCESS, "%p" },104 //{ NULL, ".", VINF_SUCCESS, "%p" },103 { NULL, "", VINF_SUCCESS, "%p" }, 104 { NULL, ".", VINF_SUCCESS, "%p" }, 105 105 { NULL, "\\", VINF_SUCCESS, "%d\\" }, 106 106 { NULL, "\\..", VINF_SUCCESS, "%d\\" }, … … 114 114 { "relative_base/dir/", "relative_also", VINF_SUCCESS, "%p\\relative_base\\dir\\relative_also" }, 115 115 #else 116 // { NULL, "", VINF_SUCCESS, "/" },117 //{ NULL, ".", VINF_SUCCESS, "%p" },116 { NULL, "", VINF_SUCCESS, "%p" }, 117 { NULL, ".", VINF_SUCCESS, "%p" }, 118 118 { NULL, "/", VINF_SUCCESS, "/" }, 119 119 { NULL, "/..", VINF_SUCCESS, "/" },
Note:
See TracChangeset
for help on using the changeset viewer.