Changeset 31404 in vbox
- Timestamp:
- Aug 5, 2010 1:02:38 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64469
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/path.h
r28800 r31404 654 654 * @param pfMode Where to store the file mode, see @ref grp_rt_fs for details. 655 655 * 656 * @remark This is wrapper around RTPath Real() + RTPathQueryInfo()657 * andexists to complement RTPathSetMode().656 * @remark This is wrapper around RTPathQueryInfoEx(RTPATH_F_FOLLOW_LINK) and 657 * exists to complement RTPathSetMode(). 658 658 */ 659 659 RTR3DECL(int) RTPathGetMode(const char *pszPath, PRTFMODE pfMode); -
trunk/src/VBox/Runtime/r3/path.cpp
r31305 r31404 191 191 RTR3DECL(int) RTPathGetMode(const char *pszPath, PRTFMODE pfMode) 192 192 { 193 AssertPtrReturn(pszPath, VERR_INVALID_POINTER);194 193 AssertPtrReturn(pfMode, VERR_INVALID_POINTER); 195 194 196 char szPathReal[RTPATH_MAX];197 int rc = RTPathReal(pszPath, szPathReal, sizeof(szPathReal));195 RTFSOBJINFO ObjInfo; 196 rc = RTPathQueryInfoEx(pszPath, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_FOLLOW_LINK); 198 197 if (RT_SUCCESS(rc)) 199 { 200 RTFSOBJINFO objInfo; 201 rc = RTPathQueryInfo(szPathReal, &objInfo, RTFSOBJATTRADD_NOTHING); 202 if (RT_SUCCESS(rc)) 203 *pfMode = objInfo.Attr.fMode; 204 } 198 *pfMode = ObjInfo.Attr.fMode; 205 199 206 200 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.