Changeset 104565 in vbox
- Timestamp:
- May 8, 2024 4:30:28 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r103471 r104565 2274 2274 */ 2275 2275 char szTemplate[RTPATH_MAX]; 2276 char szTempPathAbs[RTPATH_MAX] = ""; /* Absolute path to temporary directory / file created. */ 2276 2277 char szPath[RTPATH_MAX]; 2277 2278 uint32_t fFlags = GSTCTL_CREATETEMP_F_NONE; … … 2303 2304 if (RT_SUCCESS(rc)) 2304 2305 { 2305 char szTemplateWithPath[RTPATH_MAX] = "";2306 2306 if (szPath[0] != '\0') 2307 2307 { 2308 rc = RTStrCopy(szTemp lateWithPath, sizeof(szTemplateWithPath), szPath);2308 rc = RTStrCopy(szTempPathAbs, sizeof(szTempPathAbs), szPath); 2309 2309 if (RT_FAILURE(rc)) 2310 2310 { … … 2315 2315 else 2316 2316 { 2317 rc = RTPathTemp(szTemp lateWithPath, sizeof(szTemplateWithPath));2317 rc = RTPathTemp(szTempPathAbs, sizeof(szTempPathAbs)); 2318 2318 if (RT_FAILURE(rc)) 2319 2319 { … … 2325 2325 if (RT_SUCCESS(rc)) 2326 2326 { 2327 rc = RTPathAppend(szTemp lateWithPath, sizeof(szTemplateWithPath), szTemplate);2327 rc = RTPathAppend(szTempPathAbs, sizeof(szTempPathAbs), szTemplate); 2328 2328 if (RT_FAILURE(rc)) 2329 2329 { … … 2337 2337 { 2338 2338 if (fSecure) 2339 rc = RTDirCreateTempSecure(szTemp lateWithPath); /* File mode is fixed to 0700. */2339 rc = RTDirCreateTempSecure(szTempPathAbs); /* File mode is fixed to 0700. */ 2340 2340 else 2341 rc = RTDirCreateTemp(szTemp late, fMode);2341 rc = RTDirCreateTemp(szTempPathAbs, fMode); 2342 2342 } 2343 2343 else /* File */ 2344 2344 { 2345 2345 if (fSecure) 2346 rc = RTFileCreateTempSecure(szTemp lateWithPath); /* File mode is fixed to 0700. */2346 rc = RTFileCreateTempSecure(szTempPathAbs); /* File mode is fixed to 0700. */ 2347 2347 else 2348 rc = RTFileCreateTemp(szTemp late, fMode);2348 rc = RTFileCreateTemp(szTempPathAbs, fMode); 2349 2349 } 2350 2350 2351 VGSvcVerbose(3, "Creating temporary %s (szTemplate='%s', fFlags=%#x, fMode=%#x) -> rc=%Rrc\n",2352 pszWhat, szTemplate, fFlags, fMode, rc);2351 VGSvcVerbose(3, "Creating temporary %s (szTemplate='%s', fFlags=%#x, fMode=%#x) -> %s, rc=%Rrc\n", 2352 pszWhat, szTemplate, fFlags, fMode, szTempPathAbs, rc); 2353 2353 } 2354 2354 } … … 2364 2364 * Report result back to host. 2365 2365 */ 2366 int rc2 = VbglR3GuestCtrlFsCbCreateTemp(pHostCtx, rc, szTemp late);2366 int rc2 = VbglR3GuestCtrlFsCbCreateTemp(pHostCtx, rc, szTempPathAbs); 2367 2367 if (RT_FAILURE(rc2)) 2368 2368 {
Note:
See TracChangeset
for help on using the changeset viewer.