Index: /trunk/include/iprt/path.h
===================================================================
--- /trunk/include/iprt/path.h	(revision 78103)
+++ /trunk/include/iprt/path.h	(revision 78104)
@@ -365,15 +365,16 @@
  * Same as RTPathAbsEx only the result is RTStrDup()'ed.
  *
- * @returns Pointer to the absolute path. Use RTStrFree() to free this string.
- * @returns NULL if RTPathAbsEx() or RTStrDup() fails.
+ * @returns Pointer to the absolute path.  Use RTStrFree() to free this string.
+ * @retval  NULL if RTPathAbsEx() or RTStrDup() fails.
+ *
  * @param   pszBase         The base path to act like a current directory.
  *                          When NULL, the actual cwd is used (i.e. the call
  *                          is equivalent to RTPathAbs(pszPath, ...).
  * @param   pszPath         The path to resolve.
- *
- * @note    Current implementation is buggy and will remove trailing slashes
- *          that would normally specify a directory.  Don't depend on this.
- */
-RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath);
+ * @param   fFlags          One of the RTPATH_STR_F_STYLE_XXX flags combined
+ *                          with any of the RTPATHABS_F_XXX ones.  Most
+ *                          users will pass RTPATH_STR_F_STYLE_HOST (0).
+ */
+RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath, uint32_t fFlags);
 
 /**
Index: /trunk/src/VBox/Devices/Network/slirp/tftp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/tftp.c	(revision 78103)
+++ /trunk/src/VBox/Devices/Network/slirp/tftp.c	(revision 78104)
@@ -142,5 +142,5 @@
     else
     {
-        char *pszFullPathAbs = RTPathAbsExDup(tftp_prefix, (const char*)pcTftpSession->pszFilename);
+        char *pszFullPathAbs = RTPathAbsExDup(tftp_prefix, (const char *)pcTftpSession->pszFilename, RTPATH_STR_F_STYLE_HOST);
 
         if (   !pszFullPathAbs
Index: /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 78103)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 78104)
@@ -19,4 +19,5 @@
 #include <iprt/alloca.h>
 #include <iprt/path.h>
+#include <iprt/cpp/path.h>
 #include <iprt/dir.h>
 #include <iprt/file.h>
@@ -2394,4 +2395,6 @@
  * @param pTargetMedium out: The newly created target medium. This also gets pushed on stack.llHardDisksCreated for cleanup.
  * @param stack
+ *
+ * @throws HRESULT
  */
 void Appliance::i_importOneDiskImage(const ovf::DiskImage &di,
@@ -2401,9 +2404,8 @@
 {
     HRESULT rc;
-    char *pszAbsDstPath = RTPathAbsExDup(stack.strMachineFolder.c_str(),
-                                         strDstPath.c_str());
-    Utf8Str strAbsDstPath(pszAbsDstPath);
-    RTStrFree(pszAbsDstPath);
-    pszAbsDstPath = NULL;
+
+    Utf8Str strAbsDstPath;
+    int vrc = RTPathAbsExCxx(strAbsDstPath, stack.strMachineFolder, strDstPath);
+    AssertRCStmt(vrc, throw Global::vboxStatusCodeToCOM(vrc));
 
     /* Get the system properties. */
@@ -2432,5 +2434,5 @@
      * the current code can't possibly handle. */
     RTUUID uuid;
-    int vrc = RTUuidFromStr(&uuid, strDstPath.c_str());
+    vrc = RTUuidFromStr(&uuid, strDstPath.c_str());
     if (vrc == VINF_SUCCESS)
     {
Index: /trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp	(revision 78103)
+++ /trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp	(revision 78104)
@@ -37,19 +37,9 @@
 
 
-/**
- * Same as RTPathAbsEx only the result is RTStrDup()'ed.
- *
- * @returns Pointer to the absolute path. Use RTStrFree() to free this string.
- * @returns NULL if RTPathAbsEx() or RTStrDup() fails.
- * @param   pszBase         The base path to act like a current directory.
- *                          When NULL, the actual cwd is used (i.e. the call
- *                          is equivalent to RTPathAbs(pszPath, ...).
- * @param   pszPath         The path to resolve.
- */
-RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath)
+RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath, uint32_t fFlags)
 {
     char szPath[RTPATH_MAX];
     size_t cbPath = sizeof(szPath);
-    int rc = RTPathAbsEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, szPath, &cbPath);
+    int rc = RTPathAbsEx(pszBase, pszPath, fFlags, szPath, &cbPath);
     if (RT_SUCCESS(rc))
         return RTStrDup(szPath);
@@ -58,5 +48,5 @@
     {
         size_t   cbPrevPath = sizeof(szPath);
-        uint32_t cTries = 6;
+        uint32_t cTries = 8;
         while (cTries-- > 0)
         {
@@ -66,5 +56,5 @@
             if (pszAbsPath)
             {
-                rc = RTPathAbsEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, pszAbsPath, &cbPath);
+                rc = RTPathAbsEx(pszBase, pszPath, fFlags, pszAbsPath, &cbPath);
                 if (RT_SUCCESS(rc))
                     return pszAbsPath;
Index: /trunk/src/bldprogs/scm.cpp
===================================================================
--- /trunk/src/bldprogs/scm.cpp	(revision 78103)
+++ /trunk/src/bldprogs/scm.cpp	(revision 78104)
@@ -1105,5 +1105,5 @@
                     if (pszDir)
                     {
-                        pSettings->pszGuardRelativeToDir = RTPathAbsExDup(pszDir, pValueUnion->psz);
+                        pSettings->pszGuardRelativeToDir = RTPathAbsExDup(pszDir, pValueUnion->psz, RTPATH_STR_F_STYLE_HOST);
                         RTStrFree(pszDir);
                         if (pSettings->pszGuardRelativeToDir)
