Index: trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 39650)
+++ trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 39659)
@@ -1305,20 +1305,14 @@
  * @param   enmAddAttribs
  */
-HRESULT Guest::executeStreamQueryFsObjInfo(IN_BSTR aObjName,
-                                           GuestProcessStreamBlock &streamBlock,
-                                           PRTFSOBJINFO pObjInfo,
-                                           RTFSOBJATTRADD enmAddAttribs)
-{
-    HRESULT rc = S_OK;
+int Guest::executeStreamQueryFsObjInfo(IN_BSTR aObjName,
+                                       GuestProcessStreamBlock &streamBlock,
+                                       PRTFSOBJINFO pObjInfo,
+                                       RTFSOBJATTRADD enmAddAttribs)
+{
     Utf8Str Utf8ObjName(aObjName);
-
     int64_t iVal;
-    int vrc = streamBlock.GetInt64Ex("st_size", &iVal);
-    if (RT_SUCCESS(vrc))
+    int rc = streamBlock.GetInt64Ex("st_size", &iVal);
+    if (RT_SUCCESS(rc))
         pObjInfo->cbObject = iVal;
-    else
-        rc = setError(VBOX_E_IPRT_ERROR,
-                      tr("Unable to retrieve size for \"%s\" (%Rrc)"),
-                      Utf8ObjName.c_str(), vrc);
     /** @todo Add more stuff! */
     return rc;
@@ -2178,5 +2172,5 @@
                     {
                         rc = setErrorNoLog(VBOX_E_IPRT_ERROR,
-                                           tr("Unable to retrieve process output data"));
+                                           tr("Unable to retrieve process output data (%Rrc)"), vrc);
                     }
                 }
Index: trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp	(revision 39650)
+++ trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp	(revision 39659)
@@ -254,11 +254,7 @@
                 break;
 
-            case VERR_NOT_FOUND:
-                rc = setError(VBOX_E_IPRT_ERROR,
-                              Guest::tr("Unable to query directory existence"));
-                break;
-
             default:
-                AssertReleaseMsgFailed(("directoryExistsInternal: Unknown return value (%Rrc)\n", rc));
+                hr = setError(VBOX_E_IPRT_ERROR,
+                              Guest::tr("Unable to query directory existence (%Rrc)"), rc);
                 break;
         }
@@ -509,10 +505,10 @@
                     && aObjInfo) /* Do we want object details? */
                 {
-                    hr = executeStreamQueryFsObjInfo(aDirectory, stdOut[0],
+                    rc = executeStreamQueryFsObjInfo(aDirectory, stdOut[0],
                                                      aObjInfo, enmAddAttribs);
                 }
             }
             else
-                rc = VERR_NOT_FOUND;
+                rc = VERR_NO_DATA;
 
             if (pRC)
Index: trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp	(revision 39650)
+++ trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp	(revision 39659)
@@ -86,11 +86,7 @@
                 break;
 
-            case VERR_NOT_FOUND:
+            default:
                 hr = setError(VBOX_E_IPRT_ERROR,
-                              Guest::tr("Unable to query file existence"));
-                break;
-
-            default:
-                AssertReleaseMsgFailed(("fileExistsInternal: Unknown return value (%Rrc)\n", rc));
+                              Guest::tr("Unable to query file existence (%Rrc)"), rc);
                 break;
         }
@@ -161,10 +157,10 @@
                     && aObjInfo) /* Do we want object details? */
                 {
-                    hr = executeStreamQueryFsObjInfo(aFile, stdOut[0],
+                    rc = executeStreamQueryFsObjInfo(aFile, stdOut[0],
                                                      aObjInfo, enmAddAttribs);
                 }
             }
             else
-                rc = VERR_NOT_FOUND;
+                rc = VERR_NO_DATA;
 
             if (pRC)
@@ -223,19 +219,16 @@
 
             case VERR_FILE_NOT_FOUND:
-                rc = setError(VBOX_E_IPRT_ERROR,
+                hr = setError(VBOX_E_IPRT_ERROR,
                               Guest::tr("File not found"));
                 break;
 
-            case VERR_NOT_FOUND:
-                rc = setError(VBOX_E_IPRT_ERROR,
-                              Guest::tr("Unable to query file size"));
-                break;
-
             default:
-                AssertReleaseMsgFailed(("fileExistsInternal: Unknown return value (%Rrc)\n", rc));
+                hr = setError(VBOX_E_IPRT_ERROR,
+                              Guest::tr("Unable to query file size (%Rrc)"), rc);
                 break;
         }
     }
-    return rc;
+
+    return hr;
 }
 #endif /* VBOX_WITH_GUEST_CONTROL */
